Function at 0x41b890
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov esi, ecx
mov ebx, edx
mov edi, eax
mov edx, dword [0x4dc6c0]
mov eax, dword [0x4e8e70]
dec eax
cmp edx, eax
jg 0x41b945
mov eax, dword [0x4e8e74]
mov ecx, dword [eax + edx*4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b8db
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b8c6
dec eax
push eax
push ecx
push dword [ebx]
mov dword [esi], eax
call fcn.004a2e20
add esp, 0xc
mov edx, dword [ebx]
mov eax, dword [esi]
mov byte [eax + edx], 0
mov ecx, dword [0x4dc6c0]
inc ecx
mov dword [0x4dc6c0], ecx
push ecx
push 0x4dc6c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov edx, dword [ebx]
mov eax, dword [esi]
cmp byte [edx], 0x20
jne 0x41b922
test eax, eax
jle 0x41b93f
inc edx
mov dword [ebx], edx
dec eax
cmp byte [edx], 0x20
mov dword [esi], eax
je 0x41b913
test eax, eax
jle 0x41b93f
movsx ecx, byte [eax + edx - 1]
cmp ecx, 0x20
je 0x41b938
test ecx, ecx
jne 0x41c206
dec eax
mov dword [esi], eax
test eax, eax
jg 0x41b926
jne 0x41c206
cmp dword [0x4e8dc0], 0
je 0x41b9db
push dword [edi + 0xf8]
push str.Open:_Select_File_for_Unit
lea eax, [ebp - 0x230]
push str._s_d
push eax
call fcn.00452740
lea eax, [ebp - 0x230]
add esp, 0x10
mov edx, dword [ebx]
mov edi, eax
jmp 0x41b97f
mov edx, dword [ebx]
push edi
push 0x100
push edx
call fcn.004ac4b0
add esp, 0xc
test eax, eax
je 0x41b9b9
mov ecx, dword [ebx]
movzx edx, byte [ecx]
test edx, edx
je 0x41b9b9
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b9b2
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b99d
dec eax
mov dword [esi], eax
jmp 0x41c206
push 0x2134
push str.File_Open_Error
push str.A_File_Must_be_Selected_r_rTerminate_Program_
call fcn.004ac640
add esp, 0xc
cmp eax, 6
je 0x41c215
jmp 0x41b97d
push 0
push 0x20b
call fcn.00415770
lea edx, [ebp - 0x164]
push eax
push str._s_r_n
push edx
call fcn.00452740
add esp, 0x14
lea ecx, [ebp - 0x164]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41ba19
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41ba04
dec eax
push dword [edi + 0xf8]
push 1
mov edx, eax
push 0x20c
mov dword [ebp - 0x230], edx
call fcn.00415770
mov edx, dword [ebp - 0x230]
lea ecx, [ebp - 0x164]
push eax
push 0x4c0fa0
add edx, ecx
push edx
call fcn.00452740
add esp, 0x18
lea ecx, [ebp - 0x164]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41ba6d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41ba58
dec eax
cmp dword [edi + 0xf8], 6
mov dword [ebp - 0x10], eax
je 0x41ba9a
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x60]
push 4
push eax
push edx
push 6
call fcn.00410040
add esp, 0x10
test eax, eax
jne 0x41baff
cmp dword [edi + 0xf8], 5
je 0x41bae8
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x40]
push 1
push eax
push edx
push 5
call fcn.00410040
mov dword [ebp - 0x230], eax
add esp, 0x10
cmp dword [ebp - 0x230], 0
je 0x41bae8
cmp dword [edi + 0xf8], 6
je 0x41bad5
mov eax, dword [ebp - 0x18]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
mov eax, dword [ebp - 0x230]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1c]
push eax
push 1
push 0x178
call fcn.00412140
add esp, 0xc
test eax, eax
je 0x41bb0c
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
push eax
push 1
push 0x178
call fcn.00412140
add esp, 0xc
test eax, eax
je 0x41bb30
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push 0x178
push 0
push dword [ebp - 0x1c]
call fcn.004a1df0
push 0x178
push 0
push dword [ebp - 0x20]
call fcn.004a1df0
lea eax, [ebp - 0x230]
push 0xc4
push 0
push eax
call fcn.004a1df0
add esp, 0x24
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xf8], 6
movzx ecx, byte [edi + 0x160]
and ecx, 1
mov eax, dword [ebp - 0x1c]
movzx edx, byte [eax + 0x160]
and edx, 0xfffffffe
or edx, ecx
mov byte [eax + 0x160], dl
movzx edx, byte [edi + 0x160]
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx + 0x160]
and eax, 0xfffffffd
and edx, 2
or eax, edx
mov byte [ecx + 0x160], al
mov edx, dword [ebp - 0x1c]
movzx ecx, byte [edx + 0x160]
movzx eax, byte [edi + 0x160]
and ecx, 0xfffffffb
and eax, 4
or ecx, eax
mov byte [edx + 0x160], cl
mov edx, dword [ebp - 0x1c]
movzx eax, byte [edx + 0x160]
movzx ecx, byte [edi + 0x160]
and eax, 0xfffffff7
and ecx, 8
or eax, ecx
mov byte [edx + 0x160], al
mov ecx, dword [ebp - 0x1c]
movzx edx, byte [ecx + 0x160]
movzx eax, byte [edi + 0x160]
and edx, 0xffffffdf
and eax, 0x20
or edx, eax
mov byte [ecx + 0x160], dl
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx + 0x169]
movzx edx, byte [edi + 0x169]
and eax, 0xfffffffb
and edx, 4
or eax, edx
mov byte [ecx + 0x169], al
movzx eax, byte [edi + 0x169]
and eax, 8
mov edx, dword [ebp - 0x1c]
movzx ecx, byte [edx + 0x169]
and ecx, 0xfffffff7
or ecx, eax
mov byte [edx + 0x169], cl
movzx ecx, byte [edi + 0x160]
mov edx, dword [ebp - 0x1c]
movzx eax, byte [edx + 0x160]
and eax, 0xffffffbf
and ecx, 0x40
or eax, ecx
mov byte [edx + 0x160], al
mov ecx, dword [ebp - 0x1c]
movzx edx, byte [ecx + 0x160]
movzx eax, byte [edi + 0x160]
and edx, 0x7f
and eax, 0xffffff80
or edx, eax
mov byte [ecx + 0x160], dl
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx + 0x160]
movzx edx, byte [edi + 0x160]
and eax, 0xffffffef
and edx, 0x10
or eax, edx
mov byte [ecx + 0x160], al
mov dword [ebp - 0x1d8], 4
mov eax, 1
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x1fc], eax
mov ecx, 0x4be288
mov dword [ebp - 0x204], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41bce4
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41bccf
dec eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x200], eax
lea eax, [ebp - 0x230]
call fcn.0041c428
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0
je 0x41bd5d
push dword [ebp - 0x1c]
call fcn.00412200
push dword [ebp - 0x20]
call fcn.00412200
add esp, 8
cmp dword [edi + 0xf8], 6
je 0x41bd3b
mov eax, dword [ebp - 0x18]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
cmp dword [edi + 0xf8], 5
je 0x41bd4a
mov eax, dword [ebp - 0x14]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
mov eax, dword [ebp - 0x16c]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov dword [eax + 0xf8], 5
movzx ecx, byte [edi + 0x160]
and ecx, 1
mov eax, dword [ebp - 0x20]
movzx edx, byte [eax + 0x160]
and edx, 0xfffffffe
or edx, ecx
mov byte [eax + 0x160], dl
movzx edx, byte [edi + 0x160]
mov ecx, dword [ebp - 0x20]
movzx eax, byte [ecx + 0x160]
and eax, 0xfffffffd
and edx, 2
or eax, edx
mov byte [ecx + 0x160], al
mov edx, dword [ebp - 0x20]
movzx ecx, byte [edx + 0x160]
movzx eax, byte [edi + 0x160]
and ecx, 0xfffffffb
and eax, 4
or ecx, eax
mov byte [edx + 0x160], cl
mov edx, dword [ebp - 0x20]
movzx eax, byte [edx + 0x160]
movzx ecx, byte [edi + 0x160]
and eax, 0xfffffff7
and ecx, 8
or eax, ecx
mov byte [edx + 0x160], al
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + 0x160]
movzx eax, byte [edi + 0x160]
and edx, 0xffffffdf
and eax, 0x20
or edx, eax
mov byte [ecx + 0x160], dl
mov ecx, dword [ebp - 0x20]
movzx eax, byte [ecx + 0x169]
movzx edx, byte [edi + 0x169]
and eax, 0xfffffffb
and edx, 4
or eax, edx
mov byte [ecx + 0x169], al
movzx eax, byte [edi + 0x169]
and eax, 8
mov edx, dword [ebp - 0x20]
movzx ecx, byte [edx + 0x169]
and ecx, 0xfffffff7
or ecx, eax
mov byte [edx + 0x169], cl
movzx ecx, byte [edi + 0x160]
mov edx, dword [ebp - 0x20]
movzx eax, byte [edx + 0x160]
and eax, 0xffffffbf
and ecx, 0x40
or eax, ecx
mov byte [edx + 0x160], al
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + 0x160]
movzx eax, byte [edi + 0x160]
and edx, 0x7f
and eax, 0xffffff80
or edx, eax
mov byte [ecx + 0x160], dl
mov ecx, dword [ebp - 0x20]
movzx eax, byte [ecx + 0x160]
movzx edx, byte [edi + 0x160]
and eax, 0xffffffef
and edx, 0x10
or eax, edx
mov byte [ecx + 0x160], al
mov ecx, 0x4be280
mov dword [ebp - 0x204], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41bec2
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41bead
dec eax
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x200], eax
lea eax, [ebp - 0x230]
call fcn.0041c428
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0
jne 0x41c3b9
mov eax, dword [ebp - 0x1c]
mov byte [eax + 0x14e], 3
mov edx, dword [ebp - 0x1c]
or byte [edx + 0x165], 0x40
cmp dword [esi], 0
jne 0x41c1af
mov dword [ebp - 0x64], edi
mov edi, dword [ebp - 0x1c]
push 0
push edi
call fcn.00426100
add esp, 8
test eax, eax
jne 0x41c334
movsx ecx, byte [edi + 0x14c]
lea eax, [ecx - 1]
cmp eax, 7
ja case.default.0x41bf43
mov eax, dword [eax*4 + 0x4c3b0c]
jmp eax
mov edx, dword [edi + 0x40]
test edx, edx
je 0x41bf51
mov dword [edi + 0x3c], edx
jmp 0x41bf57
mov edx, dword [edi + 0x38]
mov dword [edi + 0x3c], edx
mov eax, dword [edi + 0xf0]
lea ecx, [edx + eax - 1]
movzx eax, byte [edi + 0x160]
mov dword [edi + 0x44], ecx
jmp 0x41c08a
mov eax, dword [edi + 0x18]
test eax, eax
je 0x41c226
test byte [eax + 0x44], 2
je 0x41bfb0
mov edx, 0x2c
mov dword [eax + 0x38], edx
mov eax, dword [edi + 0x18]
mov dword [eax + 0x3c], edx
mov eax, dword [edi + 0x64]
test eax, eax
je 0x41bf9e
xor edx, edx
mov dword [eax + 4], edx
mov dword [edi + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x2c
mov esp, ebp
pop ebp
ret
movzx edx, byte [edi + 0x164]
and edx, 7
mov eax, 0x2c
push eax
push eax
push edx
push 0xffffffffffffffff
push edi
call fcn.0041a610
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x40]
test edx, edx
je 0x41bfe6
add edx, 4
jmp 0x41bfec
mov edx, dword [edi + 0x38]
add edx, 4
mov eax, dword [edi + 0xf0]
mov dword [edi + 0x3c], edx
lea ecx, [edx + eax - 8]
movzx eax, byte [edi + 0x160]
mov dword [edi + 0x44], ecx
jmp 0x41c08a
mov edx, dword [edi + 0x40]
test edx, edx
je 0x41c014
mov dword [edi + 0x3c], edx
jmp 0x41c01a
mov edx, dword [edi + 0x38]
mov dword [edi + 0x3c], edx
mov eax, dword [edi + 0xf0]
mov dword [ebp - 0x16c], eax
add eax, edx
mov dword [ebp - 0x168], eax
movzx eax, byte [edi + 0x160]
test al, 4
je 0x41c050
test byte [edi + 0x162], 0x40
je 0x41c050
test byte [edi + 0x163], 8
je 0x41c050
cmp ecx, 1
je 0x41c05b
mov ecx, dword [ebp - 0x168]
mov dword [edi + 0x44], ecx
jmp 0x41c08a
mov ecx, dword [ebp - 0x16c]
lea ecx, [edx + ecx - 2]
mov dword [edi + 0x44], ecx
jmp 0x41c08a
push 0x1608
push str.for_nt_open_proc.c
push 2
push 8
call fcn.00414810
add esp, 0x10
movzx eax, byte [edi + 0x160]
mov edx, dword [edi + 0x3c]
test al, 4
je 0x41c0a9
test byte [edi + 0x162], 0x40
je 0x41c0a9
test byte [edi + 0x163], 8
je 0x41c0a9
cmp byte [edi + 0x14c], 1
je 0x41c0f4
movsx eax, byte [edi + 0x14e]
cmp eax, 2
jne 0x41c0d0
movsx eax, byte [edi + 0x14c]
cmp eax, 7
je 0x41c0f4
cmp eax, 6
je 0x41c0f4
cmp eax, 8
je 0x41c0f4
dec dword [edi + 0x44]
jmp 0x41c0f4
cmp eax, 1
jne 0x41c0f4
movsx eax, byte [edi + 0x14c]
cmp eax, 7
je 0x41c0ee
cmp eax, 6
je 0x41c0ee
cmp eax, 8
je 0x41c0ee
dec dword [edi + 0x44]
add edx, 5
mov dword [edi + 0x3c], edx
push dword [ebp - 0x10]
mov dword [edi + 0x4c], 0
lea eax, [ebp - 0x164]
push eax
mov dword [edi + 0x48], edx
mov edx, dword [ebp - 0x1c]
push dword [edx + 0x3c]
call fcn.004a2e20
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
add dword [edx + 0x3c], eax
push dword [ebp - 0x1c]
call fcn.00424bf0
add esp, 0x10
test eax, eax
jne 0x41c2c9
xor eax, eax
push eax
push eax
push dword [ebp - 0x20]
call fcn.00420020
add esp, 0xc
test eax, eax
jne 0x41c25e
mov edi, dword [ebp - 0x20]
mov edx, dword [edi + 0x3c]
mov edi, dword [edi + 0x44]
sub edi, edx
push edi
push edx
push dword [ebx]
call fcn.004a2e20
add esp, 0xc
mov edx, dword [ebx]
mov byte [edx + edi], 0
cmp byte [edx], 0x20
jne 0x41c179
test edi, edi
jle 0x41c251
inc edx
mov dword [ebx], edx
dec edi
cmp byte [edx], 0x20
je 0x41c168
test edi, edi
jle 0x41c251
movsx ecx, byte [edi + edx - 1]
cmp ecx, 0x20
je 0x41c193
test ecx, ecx
jne 0x41c245
dec edi
test edi, edi
jg 0x41c181
lea esi, [esi]
lea edi, [edi]
mov dword [esi], edi
je 0x41bf13
mov edi, dword [ebp - 0x64]
push 0
push dword [ebp - 0x1c]
call fcn.00409630
push 0
push dword [ebp - 0x20]
call fcn.00409630
push dword [ebp - 0x1c]
call fcn.00412200
push dword [ebp - 0x20]
call fcn.00412200
add esp, 0x18
cmp dword [edi + 0xf8], 6
je 0x41c1f7
mov eax, dword [ebp - 0x18]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
cmp dword [edi + 0xf8], 5
je 0x41c206
mov eax, dword [ebp - 0x14]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
push 1
call fcn.004ac780
push 1
call fcn.00453020
add esp, 8
push edi
mov eax, 0x2c
push eax
push eax
push 1
call fcn.00412770
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov eax, edi
mov edi, dword [ebp - 0x64]
mov dword [esi], eax
jmp 0x41c1af
mov dword [esi], edi
je 0x41bf13
jmp 0x41c1ac
mov edi, dword [ebp - 0x64]
push 0
mov ebx, eax
push dword [ebp - 0x1c]
call fcn.00409630
push 0
push dword [ebp - 0x20]
call fcn.00409630
push dword [ebp - 0x1c]
call fcn.00412200
push dword [ebp - 0x20]
call fcn.00412200
add esp, 0x18
cmp dword [edi + 0xf8], 6
je 0x41c2ab
mov edx, dword [ebp - 0x18]
push dword [edx + 0xf8]
call fcn.0040f870
pop ecx
cmp dword [edi + 0xf8], 5
je 0x41c2ba
mov edx, dword [ebp - 0x14]
push dword [edx + 0xf8]
call fcn.0040f870
pop ecx
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, ebx
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x64]
push 0
mov ebx, eax
push dword [ebp - 0x1c]
call fcn.00409630
push 0
push dword [ebp - 0x20]
call fcn.00409630
push dword [ebp - 0x1c]
call fcn.00412200
push dword [ebp - 0x20]
call fcn.00412200
add esp, 0x18
cmp dword [edi + 0xf8], 6
je 0x41c316
mov edx, dword [ebp - 0x18]
push dword [edx + 0xf8]
call fcn.0040f870
pop ecx
cmp dword [edi + 0xf8], 5
je 0x41c325
mov edx, dword [ebp - 0x14]
push dword [edx + 0xf8]
call fcn.0040f870
pop ecx
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, ebx
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x18]
test eax, eax
je 0x41c39a
test byte [eax + 0x44], 2
je 0x41c370
mov edx, 0x26
mov dword [eax + 0x38], edx
mov eax, dword [edi + 0x18]
mov dword [eax + 0x3c], edx
mov eax, dword [edi + 0x64]
test eax, eax
je 0x41c35e
xor edx, edx
mov dword [eax + 4], edx
mov dword [edi + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
movzx edx, byte [edi + 0x164]
and edx, 7
mov eax, 0x26
push eax
push eax
push edx
push 0xffffffffffffffff
push edi
call fcn.0041a610
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push edi
mov eax, 0x26
push eax
push eax
push 1
call fcn.00412770
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 0x1c]
call fcn.00409630
push dword [ebp - 0x1c]
call fcn.00412200
push dword [ebp - 0x20]
call fcn.00412200
add esp, 0x10
cmp dword [edi + 0xf8], 6
je 0x41c3f7
mov eax, dword [ebp - 0x18]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
cmp dword [edi + 0xf8], 5
je 0x41c406
mov eax, dword [ebp - 0x14]
push dword [eax + 0xf8]
call fcn.0040f870
pop ecx
mov eax, dword [ebp - 0x16c]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret