Skip to content

Instantly share code, notes, and snippets.

@jtojnar
Created September 25, 2011 17:47
Show Gist options
  • Save jtojnar/1240887 to your computer and use it in GitHub Desktop.
Save jtojnar/1240887 to your computer and use it in GitHub Desktop.
0048E004
//0048E004
//function sub_0048E004(?:TOknoRodice; ?:?; ?:TFileName; ?:?):?;
//begin
{*
0048E004 push ebp
0048E005 mov ebp,esp
0048E007 push ecx
0048E008 mov ecx,7A
0048E00D push 0
0048E00F push 0
0048E011 dec ecx
<0048E012 jne 0048E00D
0048E014 xchg ecx,dword ptr [ebp-4]
0048E017 push ebx
0048E018 push esi
0048E019 push edi
0048E01A mov dword ptr [ebp-4],ecx
0048E01D mov dword ptr [ebp-1CC],edx
0048E023 mov dword ptr [ebp-1C8],eax
0048E029 mov eax,dword ptr [ebp-4]
0048E02C call @LStrAddRef
0048E031 lea eax,[ebp-1C4]
0048E037 mov edx,dword ptr ds:[48C458]; TRadek
0048E03D call @InitializeRecord
0048E042 xor eax,eax
0048E044 push ebp
0048E045 push 48E7DF
0048E04A push dword ptr fs:[eax]
0048E04D mov dword ptr fs:[eax],esp
0048E050 mov eax,dword ptr [ebp-1CC]
0048E056 xor ecx,ecx
0048E058 mov edx,1B0
0048E05D call @FillChar
0048E062 mov byte ptr [ebp-1CD],0
0048E069 xor eax,eax
0048E06B mov dword ptr [ebp-1D4],eax
0048E071 mov eax,dword ptr [ebp-4]
0048E074 call FileExists
0048E079 test al,al
>0048E07B je 0048E730
0048E081 mov edx,dword ptr [ebp-4]
0048E084 lea eax,[ebp-3A0]
0048E08A call @Assign
0048E08F xor eax,eax
0048E091 push ebp
0048E092 push 48E0B7
0048E097 push dword ptr fs:[eax]
0048E09A mov dword ptr fs:[eax],esp
0048E09D lea eax,[ebp-3A0]
0048E0A3 call @ResetText
0048E0A8 call @_IOTest
0048E0AD xor eax,eax
0048E0AF pop edx
0048E0B0 pop ecx
0048E0B1 pop ecx
0048E0B2 mov dword ptr fs:[eax],edx
>0048E0B5 jmp 0048E0D7
<0048E0B7 jmp @HandleOnException
0048E0BC dd 1
0048E0C0 dd 408354;EInOutError
0048E0C4 dd 48E0C8
0048E0C8 call @DoneExcept
>0048E0CD jmp 0048E730
0048E0D2 call @DoneExcept
0048E0D7 lea edx,[ebp-8]
0048E0DA lea eax,[ebp-3A0]
0048E0E0 call @ReadLString
0048E0E5 lea eax,[ebp-3A0]
0048E0EB call @ReadLn
0048E0F0 call @_IOTest
0048E0F5 lea eax,[ebp-3A4]
0048E0FB push eax
0048E0FC lea edx,[ebp-3A8]
0048E102 mov eax,dword ptr [ebp-1C8]
0048E108 mov eax,dword ptr [eax+37C]; TOknoRodice.eHeslo:TEdit
0048E10E call TControl.GetText
0048E113 mov edx,dword ptr [ebp-3A8]
0048E119 mov ecx,dword ptr [ebp-8]
0048E11C mov eax,dword ptr [ebp-1D4]
0048E122 call 0047EA00
0048E127 mov edx,dword ptr [ebp-3A4]
0048E12D lea eax,[ebp-8]
0048E130 call @LStrLAsg
0048E135 inc dword ptr [ebp-1D4]
0048E13B mov edx,dword ptr [ebp-8]
0048E13E mov eax,48E804; '#'
0048E143 call Pos
0048E148 mov ecx,eax
0048E14A lea eax,[ebp-8]
0048E14D mov edx,1
0048E152 call @LStrDelete
0048E157 mov eax,dword ptr [ebp-1C8]
0048E15D add eax,81C; TOknoRodice.?f81C:string
0048E162 mov edx,dword ptr [ebp-8]
0048E165 call @LStrAsg
0048E16A cmp byte ptr [ebp+8],0
>0048E16E je 0048E19E
0048E170 push 48E810; 'Pøehled známek (poslední aktualizace '
0048E175 push dword ptr [ebp-8]
0048E178 push 48E840; ')'
0048E17D lea eax,[ebp-3AC]
0048E183 mov edx,3
0048E188 call @LStrCatN
0048E18D mov edx,dword ptr [ebp-3AC]
0048E193 mov eax,dword ptr [ebp-1C8]
0048E199 call TControl.SetText
0048E19E lea edx,[ebp-8]
0048E1A1 lea eax,[ebp-3A0]
0048E1A7 call @ReadLString
0048E1AC lea eax,[ebp-3A0]
0048E1B2 call @ReadLn
0048E1B7 call @_IOTest
0048E1BC lea eax,[ebp-3B0]
0048E1C2 push eax
0048E1C3 lea edx,[ebp-3B4]
0048E1C9 mov eax,dword ptr [ebp-1C8]
0048E1CF mov eax,dword ptr [eax+37C]; TOknoRodice.eHeslo:TEdit
0048E1D5 call TControl.GetText
0048E1DA mov edx,dword ptr [ebp-3B4]
0048E1E0 mov ecx,dword ptr [ebp-8]
0048E1E3 mov eax,dword ptr [ebp-1D4]
0048E1E9 call 0047EA00
0048E1EE mov edx,dword ptr [ebp-3B0]
0048E1F4 lea eax,[ebp-8]
0048E1F7 call @LStrLAsg
0048E1FC inc dword ptr [ebp-1D4]
0048E202 mov eax,dword ptr [ebp-1CC]
0048E208 mov edx,dword ptr [ebp-8]
0048E20B call @LStrAsg
0048E210 push 48E84C; ' '
0048E215 push dword ptr [ebp-8]
0048E218 push 48E84C; ' '
0048E21D lea eax,[ebp-3B8]
0048E223 mov edx,3
0048E228 call @LStrCatN
0048E22D mov edx,dword ptr [ebp-3B8]
0048E233 mov eax,dword ptr [ebp-1C8]
0048E239 mov eax,dword ptr [eax+394]; TOknoRodice.Box:TGroupBox
0048E23F call TControl.SetText
>0048E244 jmp 0048E701
0048E249 lea edx,[ebp-0C]
0048E24C lea eax,[ebp-3A0]
0048E252 call @ReadLString
0048E257 lea eax,[ebp-3A0]
0048E25D call @ReadLn
0048E262 call @_IOTest
0048E267 lea edx,[ebp-10]
0048E26A lea eax,[ebp-3A0]
0048E270 call @ReadLString
0048E275 lea eax,[ebp-3A0]
0048E27B call @ReadLn
0048E280 call @_IOTest
0048E285 lea edx,[ebp-14]
0048E288 lea eax,[ebp-3A0]
0048E28E call @ReadLString
0048E293 lea eax,[ebp-3A0]
0048E299 call @ReadLn
0048E29E call @_IOTest
0048E2A3 lea eax,[ebp-3BC]
0048E2A9 push eax
0048E2AA lea edx,[ebp-3C0]
0048E2B0 mov eax,dword ptr [ebp-1C8]
0048E2B6 mov eax,dword ptr [eax+37C]; TOknoRodice.eHeslo:TEdit
0048E2BC call TControl.GetText
0048E2C1 mov edx,dword ptr [ebp-3C0]
0048E2C7 mov ecx,dword ptr [ebp-0C]
0048E2CA mov eax,dword ptr [ebp-1D4]
0048E2D0 call 0047EA00
0048E2D5 mov edx,dword ptr [ebp-3BC]
0048E2DB lea eax,[ebp-0C]
0048E2DE call @LStrLAsg
0048E2E3 inc dword ptr [ebp-1D4]
0048E2E9 lea eax,[ebp-3C4]
0048E2EF push eax
0048E2F0 lea edx,[ebp-3C8]
0048E2F6 mov eax,dword ptr [ebp-1C8]
0048E2FC mov eax,dword ptr [eax+37C]; TOknoRodice.eHeslo:TEdit
0048E302 call TControl.GetText
0048E307 mov edx,dword ptr [ebp-3C8]
0048E30D mov ecx,dword ptr [ebp-10]
0048E310 mov eax,dword ptr [ebp-1D4]
0048E316 call 0047EA00
0048E31B mov edx,dword ptr [ebp-3C4]
0048E321 lea eax,[ebp-10]
0048E324 call @LStrLAsg
0048E329 inc dword ptr [ebp-1D4]
0048E32F lea eax,[ebp-3CC]
0048E335 push eax
0048E336 lea edx,[ebp-3D0]
0048E33C mov eax,dword ptr [ebp-1C8]
0048E342 mov eax,dword ptr [eax+37C]; TOknoRodice.eHeslo:TEdit
0048E348 call TControl.GetText
0048E34D mov edx,dword ptr [ebp-3D0]
0048E353 mov ecx,dword ptr [ebp-14]
0048E356 mov eax,dword ptr [ebp-1D4]
0048E35C call 0047EA00
0048E361 mov edx,dword ptr [ebp-3CC]
0048E367 lea eax,[ebp-14]
0048E36A call @LStrLAsg
0048E36F inc dword ptr [ebp-1D4]
0048E375 lea eax,[ebp-1C4]
0048E37B xor ecx,ecx
0048E37D mov edx,1A8
0048E382 call @FillChar
0048E387 lea eax,[ebp-3D4]
0048E38D push eax
0048E38E mov ecx,0A
0048E393 mov edx,1
0048E398 mov eax,dword ptr [ebp-0C]
0048E39B call @LStrCopy
0048E3A0 mov eax,dword ptr [ebp-3D4]
0048E3A6 mov ebx,dword ptr ds:[49704C]; ^gvar_004A7EB4:Boolean
0048E3AC mov ebx,dword ptr [ebx]
0048E3AE mov edx,48E858; 'TØÍDNICTVÍ'
0048E3B3 call ebx
0048E3B5 mov byte ptr [ebp-20],al
0048E3B8 lea eax,[ebp-8]
0048E3BB mov edx,dword ptr [ebp-0C]
0048E3BE call @LStrLAsg
0048E3C3 lea eax,[ebp-18]
0048E3C6 push eax
0048E3C7 mov edx,dword ptr [ebp-8]
0048E3CA mov eax,48E804; '#'
0048E3CF call Pos
0048E3D4 mov ecx,eax
0048E3D6 dec ecx
0048E3D7 mov edx,1
0048E3DC mov eax,dword ptr [ebp-8]
0048E3DF call @LStrCopy
0048E3E4 lea eax,[ebp-1C4]
0048E3EA mov edx,dword ptr [ebp-18]
0048E3ED call @LStrLAsg
0048E3F2 mov edx,dword ptr [ebp-8]
0048E3F5 mov eax,48E804; '#'
0048E3FA call Pos
0048E3FF mov ecx,eax
0048E401 lea eax,[ebp-8]
0048E404 mov edx,1
0048E409 call @LStrDelete
0048E40E lea eax,[ebp-18]
0048E411 push eax
0048E412 mov edx,dword ptr [ebp-8]
0048E415 mov eax,48E804; '#'
0048E41A call Pos
0048E41F mov ecx,eax
0048E421 dec ecx
0048E422 mov edx,1
0048E427 mov eax,dword ptr [ebp-8]
0048E42A call @LStrCopy
0048E42F lea eax,[ebp-1C0]
0048E435 mov edx,dword ptr [ebp-18]
0048E438 call @LStrLAsg
0048E43D mov edx,dword ptr [ebp-8]
0048E440 mov eax,48E804; '#'
0048E445 call Pos
0048E44A mov ecx,eax
0048E44C lea eax,[ebp-8]
0048E44F mov edx,1
0048E454 call @LStrDelete
0048E459 lea eax,[ebp-18]
0048E45C push eax
0048E45D mov edx,dword ptr [ebp-8]
0048E460 mov eax,48E804; '#'
0048E465 call Pos
0048E46A mov ecx,eax
0048E46C dec ecx
0048E46D mov edx,1
0048E472 mov eax,dword ptr [ebp-8]
0048E475 call @LStrCopy
0048E47A mov edx,dword ptr [ebp-8]
0048E47D mov eax,48E804; '#'
0048E482 call Pos
0048E487 mov ecx,eax
0048E489 lea eax,[ebp-8]
0048E48C mov edx,1
0048E491 call @LStrDelete
0048E496 lea eax,[ebp-1C]
0048E499 mov edx,dword ptr [ebp-8]
0048E49C call @LStrLAsg
0048E4A1 push 48E86C; 'Vyuèuje: '
0048E4A6 push dword ptr [ebp-18]
0048E4A9 push 48E880; '\r'
0048E4AE push 48E88C; 'Email: '
0048E4B3 push dword ptr [ebp-1C]
0048E4B6 lea eax,[ebp-1BC]
0048E4BC mov edx,5
0048E4C1 call @LStrCatN
0048E4C6 lea eax,[ebp-1B4]
0048E4CC mov edx,dword ptr [ebp-1C]
0048E4CF call @LStrLAsg
0048E4D4 lea eax,[ebp-1B8]
0048E4DA push eax
0048E4DB mov edx,dword ptr [ebp-14]
0048E4DE mov eax,48E804; '#'
0048E4E3 call Pos
0048E4E8 mov ecx,eax
0048E4EA dec ecx
0048E4EB mov edx,1
0048E4F0 mov eax,dword ptr [ebp-14]
0048E4F3 call @LStrCopy
0048E4F8 mov edx,dword ptr [ebp-14]
0048E4FB mov eax,48E804; '#'
0048E500 call Pos
0048E505 mov ecx,eax
0048E507 lea eax,[ebp-14]
0048E50A mov edx,1
0048E50F call @LStrDelete
0048E514 lea eax,[ebp-0C]
0048E517 push eax
0048E518 mov edx,dword ptr [ebp-10]
0048E51B mov eax,48E804; '#'
0048E520 call Pos
0048E525 mov ecx,eax
0048E527 dec ecx
0048E528 mov edx,1
0048E52D mov eax,dword ptr [ebp-10]
0048E530 call @LStrCopy
0048E535 mov edx,dword ptr [ebp-10]
0048E538 mov eax,48E804; '#'
0048E53D call Pos
0048E542 mov ecx,eax
0048E544 lea eax,[ebp-10]
0048E547 mov edx,1
0048E54C call @LStrDelete
0048E551 mov esi,14
0048E556 lea ebx,[ebp-1AC]
0048E55C lea eax,[ebp-18]
0048E55F push eax
0048E560 mov edx,dword ptr [ebp-0C]
0048E563 mov eax,48E89C; '~'
0048E568 call Pos
0048E56D mov ecx,eax
0048E56F dec ecx
0048E570 mov edx,1
0048E575 mov eax,dword ptr [ebp-0C]
0048E578 call @LStrCopy
0048E57D mov edx,dword ptr [ebp-0C]
0048E580 mov eax,48E89C; '~'
0048E585 call Pos
0048E58A mov ecx,eax
0048E58C lea eax,[ebp-0C]
0048E58F mov edx,1
0048E594 call @LStrDelete
0048E599 lea eax,[ebp-1C]
0048E59C push eax
0048E59D mov edx,dword ptr [ebp-10]
0048E5A0 mov eax,48E89C; '~'
0048E5A5 call Pos
0048E5AA mov ecx,eax
0048E5AC dec ecx
0048E5AD mov edx,1
0048E5B2 mov eax,dword ptr [ebp-10]
0048E5B5 call @LStrCopy
0048E5BA mov edx,dword ptr [ebp-10]
0048E5BD mov eax,48E89C; '~'
0048E5C2 call Pos
0048E5C7 mov ecx,eax
0048E5C9 lea eax,[ebp-10]
0048E5CC mov edx,1
0048E5D1 call @LStrDelete
0048E5D6 cmp dword ptr [ebp-18],0
>0048E5DA je 0048E5E6
0048E5DC mov eax,ebx
0048E5DE mov edx,dword ptr [ebp-18]
0048E5E1 call @LStrAsg
0048E5E6 cmp dword ptr [ebp-1C],0
>0048E5EA je 0048E5F6
0048E5EC mov eax,ebx
0048E5EE mov edx,dword ptr [ebp-1C]
0048E5F1 call @LStrAsg
0048E5F6 lea eax,[ebx+8]
0048E5F9 mov edx,dword ptr [ebp-18]
0048E5FC call @LStrAsg
0048E601 lea eax,[ebx+0C]
0048E604 mov edx,dword ptr [ebp-1C]
0048E607 call @LStrAsg
0048E60C cmp dword ptr [ebp-18],0
>0048E610 je 0048E62F
0048E612 cmp dword ptr [ebp-1C],0
>0048E616 je 0048E62F
0048E618 push dword ptr [ebp-18]
0048E61B push 48E880; '\r'
0048E620 push dword ptr [ebp-1C]
0048E623 mov eax,ebx
0048E625 mov edx,3
0048E62A call @LStrCatN
0048E62F lea eax,[ebx-4]
0048E632 push eax
0048E633 mov edx,dword ptr [ebp-14]
0048E636 mov eax,48E804; '#'
0048E63B call Pos
0048E640 mov ecx,eax
0048E642 dec ecx
0048E643 mov edx,1
0048E648 mov eax,dword ptr [ebp-14]
0048E64B call @LStrCopy
0048E650 mov edx,dword ptr [ebp-14]
0048E653 mov eax,48E804; '#'
0048E658 call Pos
0048E65D mov ecx,eax
0048E65F lea eax,[ebp-14]
0048E662 mov edx,1
0048E667 call @LStrDelete
0048E66C lea eax,[ebx+4]
0048E66F mov edx,dword ptr [ebx-4]
0048E672 call @LStrAsg
0048E677 add ebx,14
0048E67A dec esi
<0048E67B jne 0048E55C
0048E681 cmp byte ptr [ebp-20],0
>0048E685 je 0048E6A3
0048E687 mov eax,dword ptr [ebp-1CC]
0048E68D add eax,8
0048E690 lea edx,[ebp-1C4]
0048E696 mov ecx,dword ptr ds:[48C458]; TRadek
0048E69C call @CopyRecord
>0048E6A1 jmp 0048E701
0048E6A3 mov eax,dword ptr [ebp-1CC]
0048E6A9 mov eax,dword ptr [eax+4]
0048E6AC call @DynArrayLength
0048E6B1 inc eax
0048E6B2 push eax
0048E6B3 mov eax,dword ptr [ebp-1CC]
0048E6B9 add eax,4
0048E6BC mov ecx,1
0048E6C1 mov edx,dword ptr ds:[48C49C]; TRadky
0048E6C7 call @DynArraySetLength
0048E6CC add esp,4
0048E6CF mov eax,dword ptr [ebp-1CC]
0048E6D5 mov eax,dword ptr [eax+4]
0048E6D8 call @DynArrayLength
0048E6DD imul eax,eax,35
0048E6E0 mov edx,dword ptr [ebp-1CC]
0048E6E6 mov edx,dword ptr [edx+4]
0048E6E9 lea eax,[edx+eax*8-1A8]
0048E6F0 lea edx,[ebp-1C4]
0048E6F6 mov ecx,dword ptr ds:[48C458]; TRadek
0048E6FC call @CopyRecord
0048E701 lea eax,[ebp-3A0]
0048E707 call @EofText
0048E70C call @_IOTest
0048E711 test al,al
<0048E713 je 0048E249
0048E719 mov byte ptr [ebp-1CD],1
0048E720 lea eax,[ebp-3A0]
0048E726 call @Close
0048E72B call @_IOTest
0048E730 xor eax,eax
0048E732 pop edx
0048E733 pop ecx
0048E734 pop ecx
0048E735 mov dword ptr fs:[eax],edx
0048E738 push 48E7E9
0048E73D lea eax,[ebp-3D4]
0048E743 call @LStrClr
0048E748 lea eax,[ebp-3D0]
0048E74E call @LStrClr
0048E753 lea eax,[ebp-3CC]
0048E759 call @LStrClr
0048E75E lea eax,[ebp-3C8]
0048E764 call @LStrClr
0048E769 lea eax,[ebp-3C4]
0048E76F call @LStrClr
0048E774 lea eax,[ebp-3C0]
0048E77A call @LStrClr
0048E77F lea eax,[ebp-3BC]
0048E785 mov edx,2
0048E78A call @LStrArrayClr
0048E78F lea eax,[ebp-3B4]
0048E795 call @LStrClr
0048E79A lea eax,[ebp-3B0]
0048E7A0 mov edx,2
0048E7A5 call @LStrArrayClr
0048E7AA lea eax,[ebp-3A8]
0048E7B0 call @LStrClr
0048E7B5 lea eax,[ebp-3A4]
0048E7BB call @LStrClr
0048E7C0 lea eax,[ebp-1C4]
0048E7C6 mov edx,dword ptr ds:[48C458]; TRadek
0048E7CC call @FinalizeRecord
0048E7D1 lea eax,[ebp-1C]
0048E7D4 mov edx,7
0048E7D9 call @LStrArrayClr
0048E7DE ret
<0048E7DF jmp @HandleFinally
<0048E7E4 jmp 0048E73D
0048E7E9 movzx eax,byte ptr [ebp-1CD]
0048E7F0 pop edi
0048E7F1 pop esi
0048E7F2 pop ebx
0048E7F3 mov esp,ebp
0048E7F5 pop ebp
0048E7F6 ret 4
*}
//end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment