Function at 0x403756
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
xor esi, esi
cmp dword [0x45bf0c], esi
je 0x40376f
or eax, 0xffffffff
jmp 0x4039a3
push ebx
push edi
mov edi, 0x400
push edi
mov dword [0x45bf0c], esi
call fcn.00430ca4
pop ecx
push edi
push eax
push esi
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [0x45bf08], esi
cmp dword [ebp + 0xc], esi
je 0x4038be
push esi
push esi
push 3
push esi
push 1
push SysReAllocStringLen
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
or eax, 0xffffffff
cmp ebx, eax
jne 0x4037d1
mov dword [0x45bf0c], 4
jmp 0x4039a1
mov dword [ebp - 0xc], 0xfffffff8
push 2
push esi
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
call edi
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
je 0x403813
cmp eax, 0x52494401
je 0x403827
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0xffffd800
jg 0x4037d8
jmp 0x4038c1
push esi
lea eax, [ebp - 4]
push eax
push 4
push 0x45bf08
push ebx
call edi
jmp 0x4038c1
push esi
lea eax, [ebp - 4]
push eax
push 4
push 0x45bf08
push ebx
call edi
push esi
push esi
push dword [0x45bf08]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push ebx
call edi
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
call edi
cmp dword [ebp - 8], 0x52494402
mov dword [0x45bf08], esi
jne 0x4038c1
cmp dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
jle 0x4038c1
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
call edi
push esi
lea eax, [ebp - 4]
push eax
push 4
push 0x45bf08
push ebx
call edi
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push ebx
call edi
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 8], eax
je 0x4038c1
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
mov dword [0x45bf08], esi
jl 0x403878
jmp 0x4038c1
mov ebx, dword [ebp - 0x1c]
push dword [ebp - 0x14]
call fcn.00430bc7
pop ecx
cmp dword [0x45bf08], esi
jne 0x4038ee
push esi
push esi
push 3
push esi
cmp dword [ebp + 0xc], esi
je 0x403902
push 1
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403923
mov dword [0x45bf0c], 4
jmp 0x40399a
push esi
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403923
push dword [ebp + 8]
call fcn.004033df
pop ecx
jmp 0x4039a1
push esi
push esi
push dword [0x45bf08]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x18]
push eax
push 0xe
lea eax, [ebp - 0x2c]
push eax
push ebx
call edi
test eax, eax
jne 0x40394d
push ebx
call fcn.0040347f
pop ecx
jmp 0x40395a
cmp dword [ebp - 0x18], 0xe
je 0x403966
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x45bf0c], 1
jmp 0x40399a
cmp dword [ebp - 0x2c], 0xfeafbeba
je 0x403982
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x45bf0c], 2
jmp 0x40399a
cmp word [ebp - 0x26], 1
jbe 0x40399f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x45bf0c], 3
or eax, 0xffffffff
jmp 0x4039a1
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret