Function at 0x402070
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
push edi
push 0x458198
push esi
call fcn.00423ceb
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4022e1
push 0x420
call fcn.004208cd
mov edi, eax
mov eax, dword [esp + 0x44]
push 0x6653744d
mov dword [edi + 0x14], eax
call fcn.00403c60
mov ecx, edi
mov dword [edi + 0x18], eax
add esp, 8
mov dword [edi + 0x1c], ebp
sub ecx, esi
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi + 0x1f], al
test al, al
jne 0x4020c0
push 0
push dword [esp + 0x44]
lea ebx, [edi + 4]
push ebp
call fcn.004242ff
push ebp
push 0x10
lea eax, [esp + 0x3c]
push 1
push eax
call fcn.00423edb
mov esi, eax
lea eax, [esp + 0x44]
push ebx
push eax
push str._4sIII
call fcn.00406d80
add esp, 0x28
cmp esi, 0x10
jne 0x402274
mov eax, dword [ebx]
cmp eax, dword [str.fAR]
jne 0x40211b
mov dword [edi], 1
jmp 0x40214d
cmp eax, dword [str.fZaB]
jne 0x40212b
mov dword [edi], 2
jmp 0x40214d
cmp eax, dword [0x44e050]
jne 0x40213b
mov dword [edi], 3
jmp 0x40214d
cmp eax, dword [str.fB42]
jne 0x402274
mov dword [edi], 4
mov ebp, dword [edi + 8]
sub ebp, dword [edi + 0xc]
push ebp
call fcn.004208cd
xor ebx, ebx
mov dword [esp + 0x14], eax
add esp, 4
xor esi, esi
cmp dword [edi + 0x10], ebx
je 0x40225c
mov ecx, dword [edi + 0x14]
add ecx, dword [edi + 0xc]
push ebx
push ecx
push dword [edi + 0x1c]
call fcn.004242ff
push dword [edi + 0x1c]
push ebp
push 1
push dword [esp + 0x28]
call fcn.00423edb
add esp, 0x1c
cmp eax, ebp
jne 0x402266
push ebx
lea eax, [esp + 0x18]
push eax
push ebp
push dword [esp + 0x1c]
push edi
call fcn.00401860
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x402266
mov eax, ebp
sub eax, esi
cmp eax, 7
jb 0x402220
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
add eax, esi
push ecx
push eax
push 0x45818c
mov dword [esp + 0x24], eax
call fcn.00406d80
movzx ecx, word [esp + 0x28]
add esp, 0xc
lea eax, [ecx + esi]
cmp eax, ebp
ja 0x402224
mov eax, dword [esp + 0x14]
add eax, ecx
cmp byte [eax + esi - 1], 0
jne 0x402224
test ebx, ebx
je 0x402202
mov eax, dword [esp + 0x20]
sub eax, dword [ebx + 0xc]
mov dword [ebx + 4], eax
push dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add eax, 6
push eax
push edi
call fcn.004018d0
movzx ecx, word [esp + 0x28]
add esp, 0xc
mov ebx, eax
add esi, ecx
cmp esi, ebp
jb 0x4021b5
test ebx, ebx
je 0x402231
mov eax, dword [edi + 0xc]
sub eax, dword [ebx + 0xc]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
cmp eax, ebx
je 0x402246
push eax
call fcn.004208b2
add esp, 4
push ebx
call fcn.004208b2
push dword [edi + 0x18]
call fcn.00403dc0
add esp, 8
cmp eax, dword [edi + 0x10]
jne 0x40227a
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push dword [esp + 0x10]
call fcn.004208b2
add esp, 4
jmp 0x40227a
mov dword [edi], 0
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x40228a
push eax
call fcn.00423c04
add esp, 4
lea eax, [esp + 0x1c]
mov dword [edi + 0x1c], 0
push eax
push dword [edi + 0x18]
call fcn.004041b0
add esp, 8
cmp dword [esp + 0x24], 0
je 0x4022d0
nop dword [eax + eax]
push dword [esp + 0x20]
call fcn.004208b2
lea eax, [esp + 0x20]
push eax
push dword [edi + 0x18]
call fcn.00404210
add esp, 0xc
cmp dword [esp + 0x24], 0
jne 0x4022b0
push dword [edi + 0x18]
call fcn.00403d70
push edi
call fcn.004208b2
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret