Function at 0x4725c0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x28c
mov edi, edx
mov edx, dword [0x4f1224]
mov ebx, eax
mov eax, dword [0x4f195c]
mov esi, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp edx, dword [0x50c15c]
jge 0x472685
mov eax, dword [0x50c160]
mov ecx, dword [eax + edx*4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x47260d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4725f8
dec eax
push eax
push ecx
push dword [edi]
mov dword [esi], eax
call fcn.004a0860
add esp, 0xc
mov edx, dword [edi]
mov eax, dword [esi]
mov byte [eax + edx], 0
mov ecx, dword [0x4f1224]
inc ecx
push ecx
push 0x4f1224
mov dword [0x4f1224], ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov edx, dword [edi]
mov eax, dword [esi]
cmp byte [edx], 0x20
jne 0x472663
test eax, eax
jle 0x47267f
inc edx
dec eax
cmp byte [edx], 0x20
jne 0x47265f
test eax, eax
jle 0x47337e
inc edx
dec eax
cmp byte [edx], 0x20
je 0x472650
mov dword [edi], edx
mov dword [esi], eax
test eax, eax
jle 0x47267f
movsx ecx, byte [eax + edx - 1]
test ecx, 0xffffffdf
jne 0x473078
dec eax
mov dword [esi], eax
test eax, eax
jg 0x472667
jne 0x473078
cmp dword [0x508060], 0
je 0x472719
cmp dword [0x4f1980], 0
je 0x4730a0
mov eax, dword [0x4f19f0]
push dword [ebx + 0x118]
push str.Open:_Select_File_for_Unit
push str._s_d
lea ebx, [ebp - 0x60]
push ebx
call eax
add esp, 0x10
mov eax, dword [edi]
push ebx
push 0x104
push eax
call fcn.004a89d0
add esp, 0xc
test eax, eax
je 0x4726f7
mov ecx, dword [edi]
cmp byte [ecx], 0
je 0x4726f7
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x4726f0
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4726db
dec eax
mov dword [esi], eax
jmp 0x473061
push 0x2134
push str.File_Open_Error
push str.A_File_Must_be_Selected_r_rTerminate_Program_
call fcn.004a89d0
add esp, 0xc
cmp eax, 6
je 0x47308f
jmp 0x4726bd
cmp dword [0x4f1980], 0
je 0x473374
mov eax, dword [0x4f19f0]
mov dword [ebp - 0x290], eax
push 0
push 0x20b
call fcn.004667e0
push eax
push str._s_r_n
lea eax, [ebp - 0x160]
push eax
call dword [ebp - 0x290]
add esp, 0x14
cmp dword [0x4f1980], 0
je 0x47336a
mov eax, dword [0x4f19f0]
mov dword [ebp - 0x28c], eax
lea ecx, [ebp - 0x160]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x472788
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x472773
dec eax
mov dword [ebp - 0x290], eax
push dword [ebx + 0x118]
push 1
push 0x20c
call fcn.004667e0
push eax
mov eax, dword [ebp - 0x290]
push 0x4caba0
lea edx, [ebp + eax - 0x160]
push edx
call dword [ebp - 0x28c]
add esp, 0x18
lea ecx, [ebp - 0x160]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x4727da
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4727c5
dec eax
mov dword [ebp - 0x164], eax
cmp dword [ebx + 0x118], 6
je 0x47282b
push 4
lea eax, [ebp - 0x1b4]
push eax
lea edx, [ebp - 0x16c]
push edx
push 6
call fcn.0045de60
add esp, 0x10
test eax, eax
jne 0x472812
cmp dword [ebx + 0x118], 5
jne 0x47282b
jmp 0x472890
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push 1
lea eax, [ebp - 0x194]
push eax
lea edx, [ebp - 0x168]
push edx
push 5
call fcn.0045de60
mov dword [ebp - 0x290], eax
add esp, 0x10
cmp dword [ebp - 0x290], 0
je 0x472890
cmp dword [ebx + 0x118], 6
je 0x472871
mov eax, dword [ebp - 0x16c]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
mov eax, dword [ebp - 0x290]
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
lea eax, [ebp - 0x170]
push eax
push 1
push 0x1b0
call fcn.00460c10
add esp, 0xc
test eax, eax
je 0x4728c3
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
lea eax, [ebp - 0x174]
push eax
push 1
push 0x1b0
call fcn.00460c10
add esp, 0xc
test eax, eax
je 0x4728f6
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push 0x1b0
push 0
push dword [ebp - 0x170]
call fcn.004a08c0
push 0x1b0
push 0
push dword [ebp - 0x174]
call fcn.004a08c0
push 0xd0
push 0
lea eax, [ebp - 0x290]
push eax
call fcn.004a08c0
add esp, 0x24
mov eax, dword [ebp - 0x170]
mov dword [eax + 0x118], 6
mov eax, dword [ebp - 0x170]
movzx ecx, byte [ebx + 0x18c]
and ecx, 1
movzx edx, byte [eax + 0x18c]
and edx, 0xfffffffe
or edx, ecx
mov byte [eax + 0x18c], dl
mov ecx, dword [ebp - 0x170]
movzx edx, byte [ebx + 0x18c]
and edx, 2
movzx eax, byte [ecx + 0x18c]
and eax, 0xfffffffd
or eax, edx
mov byte [ecx + 0x18c], al
mov edx, dword [ebp - 0x170]
movzx eax, byte [ebx + 0x18c]
and eax, 4
movzx ecx, byte [edx + 0x18c]
and ecx, 0xfffffffb
or ecx, eax
mov byte [edx + 0x18c], cl
mov edx, dword [ebp - 0x170]
movzx ecx, byte [ebx + 0x18c]
and ecx, 8
movzx eax, byte [edx + 0x18c]
and eax, 0xfffffff7
or eax, ecx
mov byte [edx + 0x18c], al
mov ecx, dword [ebp - 0x170]
movzx eax, byte [ebx + 0x18c]
and eax, 0x20
movzx edx, byte [ecx + 0x18c]
and edx, 0xffffffdf
or edx, eax
mov byte [ecx + 0x18c], dl
mov ecx, dword [ebp - 0x170]
movzx edx, byte [ebx + 0x195]
and edx, 4
movzx eax, byte [ecx + 0x195]
and eax, 0xfffffffb
or eax, edx
mov byte [ecx + 0x195], al
mov edx, dword [ebp - 0x170]
movzx eax, byte [ebx + 0x195]
and eax, 8
movzx ecx, byte [edx + 0x195]
and ecx, 0xfffffff7
or ecx, eax
mov byte [edx + 0x195], cl
mov edx, dword [ebp - 0x170]
movzx ecx, byte [ebx + 0x18c]
and ecx, 0x40
movzx eax, byte [edx + 0x18c]
and eax, 0xffffffbf
or eax, ecx
mov byte [edx + 0x18c], al
mov ecx, dword [ebp - 0x170]
movzx eax, byte [ebx + 0x18c]
and eax, 0xffffff80
movzx edx, byte [ecx + 0x18c]
and edx, 0x7f
or edx, eax
mov byte [ecx + 0x18c], dl
mov ecx, dword [ebp - 0x170]
movzx edx, byte [ebx + 0x18c]
and edx, 0x10
movzx eax, byte [ecx + 0x18c]
and eax, 0xffffffef
or eax, edx
mov byte [ecx + 0x18c], al
mov ecx, 0x4c7190
mov eax, 1
mov dword [ebp - 0x290], eax
mov dword [ebp - 0x234], 4
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x264], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x472ad1
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x472abc
dec eax
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x290]
mov edx, dword [ebp - 0x170]
call fcn.00473398
mov dword [ebp - 0x1c0], eax
cmp dword [ebp - 0x1c0], 0
je 0x472b69
push dword [ebp - 0x170]
call fcn.00460cc0
push dword [ebp - 0x174]
call fcn.00460cc0
add esp, 8
cmp dword [ebx + 0x118], 6
je 0x472b36
mov eax, dword [ebp - 0x16c]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
cmp dword [ebx + 0x118], 5
je 0x472b4a
mov eax, dword [ebp - 0x168]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
mov eax, dword [ebp - 0x1c0]
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x174]
mov dword [eax + 0x118], 5
mov eax, dword [ebp - 0x174]
movzx ecx, byte [ebx + 0x18c]
and ecx, 1
movzx edx, byte [eax + 0x18c]
and edx, 0xfffffffe
or edx, ecx
mov byte [eax + 0x18c], dl
mov ecx, dword [ebp - 0x174]
movzx edx, byte [ebx + 0x18c]
and edx, 2
movzx eax, byte [ecx + 0x18c]
and eax, 0xfffffffd
or eax, edx
mov byte [ecx + 0x18c], al
mov edx, dword [ebp - 0x174]
movzx eax, byte [ebx + 0x18c]
and eax, 4
movzx ecx, byte [edx + 0x18c]
and ecx, 0xfffffffb
or ecx, eax
mov byte [edx + 0x18c], cl
mov edx, dword [ebp - 0x174]
movzx ecx, byte [ebx + 0x18c]
and ecx, 8
movzx eax, byte [edx + 0x18c]
and eax, 0xfffffff7
or eax, ecx
mov byte [edx + 0x18c], al
mov ecx, dword [ebp - 0x174]
movzx eax, byte [ebx + 0x18c]
and eax, 0x20
movzx edx, byte [ecx + 0x18c]
and edx, 0xffffffdf
or edx, eax
mov byte [ecx + 0x18c], dl
mov ecx, dword [ebp - 0x174]
movzx edx, byte [ebx + 0x195]
and edx, 4
movzx eax, byte [ecx + 0x195]
and eax, 0xfffffffb
or eax, edx
mov byte [ecx + 0x195], al
mov edx, dword [ebp - 0x174]
movzx eax, byte [ebx + 0x195]
and eax, 8
movzx ecx, byte [edx + 0x195]
and ecx, 0xfffffff7
or ecx, eax
mov byte [edx + 0x195], cl
mov edx, dword [ebp - 0x174]
movzx ecx, byte [ebx + 0x18c]
and ecx, 0x40
movzx eax, byte [edx + 0x18c]
and eax, 0xffffffbf
or eax, ecx
mov byte [edx + 0x18c], al
mov ecx, dword [ebp - 0x174]
movzx eax, byte [ebx + 0x18c]
and eax, 0xffffff80
movzx edx, byte [ecx + 0x18c]
and edx, 0x7f
or edx, eax
mov byte [ecx + 0x18c], dl
mov ecx, dword [ebp - 0x174]
movzx edx, byte [ebx + 0x18c]
and edx, 0x10
movzx eax, byte [ecx + 0x18c]
and eax, 0xffffffef
or eax, edx
mov byte [ecx + 0x18c], al
mov ecx, str.CONIN_
mov dword [ebp - 0x264], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x472cef
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x472cda
dec eax
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x290]
mov edx, dword [ebp - 0x174]
mov dword [eax + 0x10], 0
call fcn.00473398
mov dword [ebp - 0x1c0], eax
cmp dword [ebp - 0x1c0], 0
jne 0x4732eb
mov eax, dword [ebp - 0x170]
mov byte [eax + 0x17c], 3
mov edx, dword [ebp - 0x170]
or byte [edx + 0x191], 0x40
cmp dword [esi], 0
jne 0x472ff4
mov dword [ebp - 0x1b8], ebx
push 0
mov ebx, dword [ebp - 0x170]
push ebx
call fcn.0046d250
add esp, 8
test eax, eax
jne 0x473248
movsx edx, byte [ebx + 0x17a]
cmp edx, 8
ja 0x472e8c
movzx eax, byte [edx + 0x4cea9c]
add eax, 0x472d81
jmp eax
push 0x1882
push str.for_nt_open_proc.c
push 2
push 8
call fcn.00464d00
add esp, 0x10
movzx eax, byte [ebx + 0x18c]
mov ecx, dword [ebx + 0x4c]
test al, 4
je 0x472ecb
test byte [ebx + 0x18e], 0x40
je 0x472ecb
test byte [ebx + 0x18f], 8
je 0x472ecb
cmp byte [ebx + 0x17a], 1
je 0x472f16
movsx eax, byte [ebx + 0x17c]
cmp eax, 2
jne 0x472ef2
movsx eax, byte [ebx + 0x17a]
cmp eax, 7
je 0x472f16
cmp eax, 6
je 0x472f16
cmp eax, 8
je 0x472f16
dec dword [ebx + 0x54]
jmp 0x472f16
cmp eax, 1
jne 0x472f16
movsx eax, byte [ebx + 0x17a]
cmp eax, 7
je 0x472f10
cmp eax, 6
je 0x472f10
cmp eax, 8
je 0x472f10
dec dword [ebx + 0x54]
add ecx, 5
mov dword [ebx + 0x4c], ecx
push dword [ebp - 0x164]
mov dword [ebx + 0x58], ecx
lea eax, [ebp - 0x160]
mov dword [ebx + 0x5c], 0
mov edx, dword [eax - 0x10]
push eax
push dword [edx + 0x4c]
call fcn.004a0860
mov edx, dword [ebp - 0x170]
mov eax, dword [ebp - 0x164]
add dword [edx + 0x4c], eax
push dword [ebp - 0x170]
call fcn.0046bfe0
add esp, 0x10
test eax, eax
jne 0x4731bd
xor eax, eax
push eax
push eax
push dword [ebp - 0x174]
call fcn.004787e0
add esp, 0xc
test eax, eax
jne 0x47312d
mov edx, dword [ebp - 0x174]
mov ebx, dword [edx + 0x54]
sub ebx, dword [edx + 0x4c]
push ebx
push dword [edx + 0x4c]
push dword [edi]
call fcn.004a0860
add esp, 0xc
mov eax, dword [edi]
mov byte [eax + ebx], 0
cmp byte [eax], 0x20
jne 0x472fbc
test ebx, ebx
jle 0x473120
inc eax
dec ebx
cmp byte [eax], 0x20
jne 0x472fba
test ebx, ebx
jle 0x473111
inc eax
dec ebx
cmp byte [eax], 0x20
je 0x472fab
mov dword [edi], eax
test ebx, ebx
jle 0x473120
movsx edx, byte [ebx + eax - 1]
test edx, 0xffffffdf
jne 0x473102
dec ebx
test ebx, ebx
jg 0x472fc4
lea esi, [esi]
lea edi, [edi]
mov dword [esi], ebx
je 0x472d49
mov ebx, dword [ebp - 0x1b8]
push 0
push dword [ebp - 0x170]
call fcn.0044cbd0
push 0
push dword [ebp - 0x174]
call fcn.0044cbd0
push dword [ebp - 0x170]
call fcn.00460cc0
push dword [ebp - 0x174]
call fcn.00460cc0
add esp, 0x18
cmp dword [ebx + 0x118], 6
je 0x47304d
mov eax, dword [ebp - 0x16c]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
cmp dword [ebx + 0x118], 5
je 0x473061
mov eax, dword [ebp - 0x168]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push 1
call fcn.004a89d0
add esp, 4
push 1
call fcn.004adb02
call fcn.004a0af0
jmp 0x47269f
call fcn.004a91cc
mov eax, 0x2c
push eax
movzx edx, byte [ebx + 0x190]
push eax
and edx, 7
push edx
push 0xffffffffffffffff
push ebx
call fcn.0046e340
add esp, 0x14
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
jmp 0x472823
mov eax, ebx
mov ebx, dword [ebp - 0x1b8]
mov dword [esi], eax
jmp 0x472ff4
mov dword [edi], eax
mov dword [esi], ebx
je 0x472d49
jmp 0x472fee
mov dword [esi], ebx
je 0x472d49
jmp 0x472fee
push 0
push dword [ebp - 0x170]
mov esi, eax
mov ebx, dword [ebp - 0x1b8]
call fcn.0044cbd0
push 0
push dword [ebp - 0x174]
call fcn.0044cbd0
push dword [ebp - 0x170]
call fcn.00460cc0
push dword [ebp - 0x174]
call fcn.00460cc0
add esp, 0x18
cmp dword [ebx + 0x118], 6
je 0x47318e
mov edx, dword [ebp - 0x16c]
push dword [edx + 0x118]
call fcn.0045f1b0
add esp, 4
cmp dword [ebx + 0x118], 5
je 0x4731a2
mov edx, dword [ebp - 0x168]
push dword [edx + 0x118]
call fcn.0045f1b0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
mov eax, esi
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push 0
push dword [ebp - 0x170]
mov esi, eax
mov ebx, dword [ebp - 0x1b8]
call fcn.0044cbd0
push 0
push dword [ebp - 0x174]
call fcn.0044cbd0
push dword [ebp - 0x170]
call fcn.00460cc0
push dword [ebp - 0x174]
call fcn.00460cc0
add esp, 0x18
cmp dword [ebx + 0x118], 6
je 0x47321e
mov edx, dword [ebp - 0x16c]
push dword [edx + 0x118]
call fcn.0045f1b0
add esp, 4
cmp dword [ebx + 0x118], 5
je 0x473232
mov edx, dword [ebp - 0x168]
push dword [edx + 0x118]
call fcn.0045f1b0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
jmp 0x4731b3
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x4732c3
test byte [eax + 0x44], 2
je 0x473290
mov edx, 0x26
mov dword [eax + 0x38], edx
mov eax, dword [ebx + 0x20]
mov dword [eax + 0x3c], edx
mov eax, dword [ebx + 0x78]
test eax, eax
je 0x473272
xor edx, edx
mov dword [eax + 4], edx
mov dword [ebx + 0x78], edx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
mov eax, 0x26
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, 0x26
push eax
movzx edx, byte [ebx + 0x190]
push eax
and edx, 7
push edx
push 0xffffffffffffffff
push ebx
call fcn.0046e340
add esp, 0x14
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
jmp 0x472823
push ebx
mov eax, 0x26
push eax
push eax
push 1
call fcn.00463630
add esp, 0x10
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
jmp 0x472823
push 0
push dword [ebp - 0x170]
call fcn.0044cbd0
push dword [ebp - 0x170]
call fcn.00460cc0
push dword [ebp - 0x174]
call fcn.00460cc0
add esp, 0x10
cmp dword [ebx + 0x118], 6
je 0x473337
mov eax, dword [ebp - 0x16c]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
cmp dword [ebx + 0x118], 5
je 0x47334b
mov eax, dword [ebp - 0x168]
push dword [eax + 0x118]
call fcn.0045f1b0
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x4f195c]
jne 0x4730aa
mov eax, dword [ebp - 0x1c0]
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call fcn.004a0af0
jmp 0x472760
call fcn.004a0af0
jmp 0x472726
mov dword [edi], edx
mov dword [esi], eax
jne 0x473078
jmp 0x472685