Function at 0x41201c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10044
call fcn.004394b0
mov eax, dword [0x450060]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
and dword [ebp - 0x1001c], 0
push dword [ebp + 0x14]
push 0x40604c
push 1
call fcn.0040b425
add esp, 0xc
and dword [ebp - 0x10014], 0
or dword [ebp - 0x10018], 0xffffffff
or dword [ebp - 0x10010], 0xffffffff
and dword [ebp - 0x1000c], 0
cmp dword [ebp + 0x18], 0
je 0x41209c
push dword [ebp + 0x1c]
mov eax, dword [ebp + 0xc]
push dword [eax + 0x24]
push dword [eax + 0x20]
push dword [ebp + 0x14]
push 6
call dword [ebp + 0x18]
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
je 0x41209c
jmp 0x4124ea
lea eax, [ebp - 0x10014]
push eax
push dword [ebp + 0x14]
call fcn.0040f074
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jge 0x4120c4
jmp 0x4124ea
push 0
push dword [ebp - 0x10014]
call fcn.0040e894
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jge 0x4120ea
jmp 0x4124ea
push 0
push 0x8000080
push 2
push 0
push 5
push 0x40000000
push dword [ebp + 0x14]
call fcn.004103b7
mov dword [ebp - 0x10018], eax
cmp dword [ebp - 0x10018], 0xffffffff
jne 0x412162
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1001c], eax
push dword [ebp - 0x1001c]
call fcn.00407c6d
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jl 0x412143
mov dword [ebp - 0x1001c], 0x80004005
push dword [ebp - 0x1001c]
push 0x4fe
push 0x405ffc
call fcn.0040e33f
jmp 0x4124ea
cmp dword [ebp + 0x10], 0
je 0x4121e0
push 0
push 0x8000080
push 3
push 0
push 3
push SysReAllocString
push dword [ebp + 0x14]
call fcn.004103b7
mov dword [ebp - 0x10010], eax
cmp dword [ebp - 0x10010], 0xffffffff
jne 0x4121e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1001c], eax
push dword [ebp - 0x1001c]
call fcn.00407c6d
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jl 0x4121c1
mov dword [ebp - 0x1001c], 0x80004005
push dword [ebp - 0x1001c]
push 0x507
push 0x405ffc
call fcn.0040e33f
jmp 0x4124ea
push 0
push 0
mov eax, dword [ebp + 0xc]
push dword [eax + 0x24]
push dword [eax + 0x20]
push dword [ebp - 0x10018]
call fcn.0040feaa
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jge 0x412211
jmp 0x4124ea
push dword [ebp - 0x10018]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x412270
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1001c], eax
push dword [ebp - 0x1001c]
call fcn.00407c6d
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jl 0x412251
mov dword [ebp - 0x1001c], 0x80004005
push dword [ebp - 0x1001c]
push 0x510
push 0x405ffc
call fcn.0040e33f
jmp 0x4124ea
push 0
push 0
push 0
push dword [ebp - 0x10018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4122d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1001c], eax
push dword [ebp - 0x1001c]
call fcn.00407c6d
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jl 0x4122b7
mov dword [ebp - 0x1001c], 0x80004005
push dword [ebp - 0x1001c]
push 0x515
push 0x405ffc
call fcn.0040e33f
jmp 0x4124ea
push 0
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax + 8]
add edx, dword [ecx + 0x18]
mov eax, dword [eax + 0xc]
adc eax, dword [ecx + 0x1c]
push eax
push edx
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.0040feaa
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jge 0x412314
jmp 0x4124ea
mov eax, dword [ebp - 0x1000c]
xor ecx, ecx
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + 0x20]
sub esi, eax
mov eax, dword [edx + 0x24]
sbb eax, ecx
mov dword [ebp - 0x10030], esi
mov dword [ebp - 0x1002c], eax
cmp dword [ebp - 0x1002c], 0
jb 0x41235f
ja 0x41234c
cmp dword [ebp - 0x10030], 0x10000
jbe 0x41235f
mov dword [ebp - 0x10038], 0x10000
and dword [ebp - 0x10034], 0
jmp 0x412380
mov eax, dword [ebp - 0x1000c]
xor ecx, ecx
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + 0x20]
sub esi, eax
mov eax, dword [edx + 0x24]
sbb eax, ecx
mov dword [ebp - 0x10038], esi
mov dword [ebp - 0x10034], eax
mov eax, dword [ebp - 0x10038]
mov dword [ebp - 0x10020], eax
and dword [ebp - 0x10024], 0
push 0
lea eax, [ebp - 0x10024]
push eax
push dword [ebp - 0x10020]
lea eax, [ebp - 0x10008]
push eax
mov eax, dword [ebp + 8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x412407
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1001c], eax
push dword [ebp - 0x1001c]
call fcn.00407c6d
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jl 0x4123e8
mov dword [ebp - 0x1001c], 0x80004005
push dword [ebp - 0x1001c]
push 0x523
push 0x405ffc
call fcn.0040e33f
jmp 0x4124ea
and dword [ebp - 0x10028], 0
lea eax, [ebp - 0x10028]
push eax
push dword [ebp - 0x10024]
lea eax, [ebp - 0x10008]
push eax
push dword [ebp - 0x10018]
call fcn.00410277
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
jge 0x412446
jmp 0x4124ea
mov eax, dword [ebp - 0x1000c]
add eax, dword [ebp - 0x10028]
mov dword [ebp - 0x1000c], eax
cmp dword [ebp + 0x18], 0
je 0x412486
push dword [ebp + 0x1c]
mov eax, dword [ebp - 0x1000c]
xor ecx, ecx
push ecx
push eax
push dword [ebp + 0x14]
push 7
call dword [ebp + 0x18]
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x1001c], 0
je 0x412486
jmp 0x4124ea
mov eax, dword [ebp - 0x1000c]
xor ecx, ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x10040], eax
mov dword [ebp - 0x1003c], ecx
mov dword [ebp - 0x10044], edx
mov eax, dword [ebp - 0x10044]
mov ecx, dword [ebp - 0x1003c]
cmp ecx, dword [eax + 0x24]
jb 0x412314
ja 0x4124cf
mov eax, dword [ebp - 0x10044]
mov ecx, dword [ebp - 0x10040]
cmp ecx, dword [eax + 0x20]
jb 0x412314
cmp dword [ebp + 0x18], 0
je 0x4124ea
push dword [ebp + 0x1c]
push 0
push 0
push dword [ebp + 0x14]
push 8
call dword [ebp + 0x18]
mov dword [ebp - 0x1001c], eax
cmp dword [ebp - 0x10018], 0xffffffff
je 0x4124ff
push dword [ebp - 0x10018]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10010], 0xffffffff
je 0x41252c
cmp dword [ebp + 0x10], 0
je 0x41252c
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x412521
mov eax, dword [ebp + 0x10]
add eax, 4
mov dword [ebp + 0x10], eax
jmp 0x41250e
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10010]
mov dword [eax], ecx
cmp dword [ebp - 0x10014], 0
je 0x412540
push dword [ebp - 0x10014]
call fcn.0040c820
mov eax, dword [ebp - 0x1001c]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042cd6d
leave
ret 0x18