Function at 0x4204e8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
cmp dword [ebp + 8], 0
je 0x4204fa
cmp dword [ebp + 0xc], 0
jne 0x420501
xor eax, eax
jmp 0x420aa6
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], 0
je 0x42057d
push 3
mov ecx, dword [ebp - 4]
push ecx
call fcn.00420213
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x134]
mov edx, dword [ecx + edx + 0xc]
and edx, 0x20000
test edx, edx
je 0x420578
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov ecx, dword [ebp - 8]
add ecx, dword [edx + eax]
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x134]
xor ecx, dword [eax + edx + 8]
mov dword [ebp - 8], ecx
jmp 0x420aa3
push 1
mov ecx, dword [str._listfile_]
push ecx
call fcn.00420213
add esp, 8
mov dword [ebp - 0x10], eax
push 2
mov edx, dword [str._listfile_]
push edx
call fcn.00420213
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
cmp ecx, dword [ebp - 0x10]
jne 0x420667
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
cmp eax, dword [ebp - 0x14]
jne 0x420667
push 3
mov ecx, dword [str._listfile_]
push ecx
call fcn.00420213
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x134]
mov edx, dword [ecx + edx + 0xc]
and edx, 0x20000
test edx, edx
je 0x42061e
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov ecx, dword [ebp - 8]
add ecx, dword [edx + eax]
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x134]
xor ecx, dword [eax + edx + 8]
mov dword [ebp - 8], ecx
push 4
push 0x1000
mov ecx, dword [str._listfile_]
push ecx
call fcn.00431540
add esp, 4
add eax, 1
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x420662
mov ecx, dword [str._listfile_]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
call fcn.00431cd0
add esp, 8
jmp 0x4208e5
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
mov edx, dword [0x447aa4]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x20], 0
jmp 0x420688
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 7
jae 0x4208dc
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx*4 + 0x440988]
mov dword [0x447aa4], edx
lea eax, [ebp - 0x1c]
push eax
push 0
mov ecx, dword [str._listfile_]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.004170fd
test eax, eax
je 0x4208d7
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x144]
cmp dword [ecx + 8], 0
jne 0x4206e3
cmp dword [0x447aa4], 0
je 0x4206e3
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00417809
jmp 0x42067f
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00417a59
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jbe 0x420755
push 4
push 0x1000
mov ecx, dword [ebp - 0x2c]
add ecx, 1
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x420724
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00417809
jmp 0x42067f
push 0
push 0
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00417f9b
test eax, eax
jne 0x420755
push 0x8000
push 0
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00417809
cmp dword [ebp - 0x24], 0
je 0x4208d7
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x30], edx
jmp 0x42077f
mov eax, dword [ebp - 0x30]
push eax
call fcn.00420087
add esp, 4
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4208a3
mov ecx, dword [ebp - 0x30]
movsx edx, byte [ecx]
test edx, edx
jne 0x420798
jmp 0x4208a3
mov eax, dword [ebp - 0x30]
push eax
call fcn.0041fff0
add esp, 4
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x38]
mov dl, byte [ecx]
mov byte [ebp - 0x34], dl
mov eax, dword [ebp - 0x30]
add eax, dword [ebp - 0x38]
mov byte [eax], 0
push 1
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.00420213
add esp, 8
mov dword [ebp - 0x10], eax
push 2
mov edx, dword [ebp - 0x30]
push edx
call fcn.00420213
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
cmp ecx, dword [ebp - 0x10]
jne 0x420893
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
cmp eax, dword [ebp - 0x14]
jne 0x420893
push 3
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.00420213
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x134]
mov edx, dword [ecx + edx + 0xc]
and edx, 0x20000
test edx, edx
je 0x420853
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov ecx, dword [ebp - 8]
add ecx, dword [edx + eax]
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x134]
xor ecx, dword [eax + edx + 8]
mov dword [ebp - 8], ecx
push 4
push 0x1000
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.00431540
add esp, 4
add eax, 1
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x420891
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
call fcn.00431cd0
add esp, 8
jmp 0x4208a3
mov ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x38]
mov dl, byte [ebp - 0x34]
mov byte [ecx], dl
jmp 0x420770
cmp dword [ebp - 0x30], 0
je 0x4208c6
mov eax, dword [ebp - 0x30]
movsx ecx, byte [eax]
test ecx, ecx
je 0x4208c6
push 0x8000
push 0
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4208dc
push 0x8000
push 0
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x42067f
mov ecx, dword [ebp - 0x28]
mov dword [0x447aa4], ecx
cmp dword [ebp - 8], 0
jne 0x420aa3
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x134]
mov edx, dword [ecx + edx + 0xc]
and edx, 0x200
test edx, edx
jne 0x42092c
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov eax, dword [edx + eax + 0xc]
and eax, 0x100
test eax, eax
je 0x420aa3
mov dword [ebp - 0x3c], 0
push 4
mov ecx, dword [0x440964]
push ecx
mov edx, dword [ebp + 8]
add edx, 0x144
push edx
call fcn.00431a80
add esp, 0xc
test eax, eax
jne 0x42099e
push 0
push 0
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x12c]
add ecx, dword [edx + eax]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x40]
push ecx
push 4
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx + 0x152]
mov ecx, eax
mov edx, 0x200
shl edx, cl
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov eax, dword [edx + eax + 8]
xor edx, edx
div dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov eax, dword [edx + eax + 8]
xor edx, edx
div dword [ebp - 0x4c]
test edx, edx
je 0x4209f6
mov eax, dword [ebp - 0x48]
add eax, 1
mov dword [ebp - 0x48], eax
push 4
push 0x1000
mov ecx, dword [ebp - 0x48]
lea edx, [ecx*4 + 4]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x420a20
xor eax, eax
jmp 0x420aa6
push 0
push 0
mov eax, dword [ebp - 0xc]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x134]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x12c]
add ecx, dword [edx + eax]
add ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x48]
lea eax, [edx*4 + 4]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x48]
lea edx, [ecx*4 + 4]
push edx
mov eax, dword [ebp - 0x44]
push eax
call fcn.004203ee
add esp, 8
mov dword [ebp - 8], eax
push 0x8000
push 0
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret