Function at 0x407f32
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov dword [esp + 0x14], ebp
call fcn.0040820e
mov ebx, dword [esp + 0x20]
cmp ebx, ebp
jne 0x407f51
mov ebx, 0x40c02a
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebp
mov edi, pe_nt_image_headers32
push edi
push 3
push ebp
push 1
push 0xc0000000
push ebx
mov dword [0x40e74c], ebp
call esi
mov dword [0x40e740], eax
cmp eax, 0xffffffff
jne 0x407fbc
push ebp
push edi
push 3
push ebp
push 1
mov ebp, 0x80000000
push ebp
push ebx
call esi
mov dword [0x40e740], eax
cmp eax, 0xffffffff
jne 0x407fa7
push 0
push edi
push 3
push 0
push 3
push ebp
push ebx
call esi
mov dword [0x40e740], eax
mov dword [0x40e74c], 1
cmp eax, 0xffffffff
je 0x4081b2
xor ebp, ebp
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 3
mov edi, eax
mov eax, dword [esp + 0x28]
pop ebx
mov dword [0x40e758], ebp
mov dword [0x40e76c], eax
cmp edi, ebx
jl 0x408030
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
lea eax, [esp + 0x1c]
push eax
push dword [0x40e740]
call esi
cmp dword [esp + 0x18], ebx
jne 0x408021
push ebx
lea eax, [esp + 0x14]
push 0x40c1c0
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x408021
mov dword [0x40e758], 0xfde9
sub edi, ebx
jmp 0x408030
push ebp
push ebp
push ebp
push dword [0x40e740]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebp
jle 0x408066
lea eax, [edi + 2]
push eax
push ebp
push dword [0x40e428]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x40e750], eax
cmp eax, ebp
je 0x4081f1
push ebp
lea ecx, [esp + 0x1c]
push ecx
push edi
push eax
push dword [0x40e740]
call esi
mov edi, dword [esp + 0x18]
mov eax, dword [0x40e750]
cmp eax, ebp
je 0x4081f1
xor ecx, ecx
mov word [eax + edi], cx
mov esi, dword [0x40e750]
lea eax, [esi + edi]
mov dword [0x40e754], eax
mov edi, 0x40e75c
mov bl, 0xa
cmp esi, eax
jae 0x4081f1
mov al, byte [esi]
cmp al, 0x20
je 0x4080a0
cmp al, 9
jne 0x4080a3
inc esi
jmp 0x408096
mov al, byte [esi]
cmp al, 0x3b
jne 0x4080e3
inc esi
cmp byte [esi], 0x20
jne 0x4080b0
inc esi
push esi
push 2
push dword [esp + 0x1c]
push edi
call fcn.00407f02
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x4080d9
mov al, byte [esi]
cmp al, bl
je 0x408196
cmp al, 0xd
je 0x408196
inc esi
cmp byte [esi], 0
jne 0x4080c6
jmp 0x408196
cmp al, 0x5b
jne 0x40812d
inc esi
push esi
push 1
push dword [esp + 0x1c]
push edi
call fcn.00407f02
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x40810d
mov al, byte [esi]
cmp al, 0x5d
je 0x408117
cmp al, bl
je 0x408112
cmp al, 0xd
je 0x408112
inc esi
cmp byte [esi], 0
jne 0x4080fe
cmp byte [esi], 0x5d
jne 0x408196
mov byte [esi], 0
jmp 0x408124
cmp al, bl
je 0x408199
cmp al, 0xd
je 0x40819a
inc esi
mov al, byte [esi]
test al, al
jne 0x40811c
jmp 0x40819a
cmp al, bl
je 0x40819a
cmp al, 0xd
je 0x40819a
mov edx, esi
jmp 0x408148
cmp al, 0x3d
je 0x40814c
cmp al, 0xd
je 0x40814c
cmp al, bl
je 0x40814c
inc esi
mov al, byte [esi]
test al, al
jne 0x408139
lea eax, [esi - 1]
jmp 0x40815e
mov cl, byte [eax]
cmp cl, 0x20
je 0x40815d
cmp cl, 9
jne 0x408162
dec eax
cmp eax, edx
ja 0x408151
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x408166
cmp al, 9
je 0x408166
push esi
push edx
push dword [esp + 0x1c]
push edi
call fcn.00407f02
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x408191
mov al, byte [esi]
cmp al, bl
je 0x408196
cmp al, 0xd
je 0x408196
inc esi
cmp byte [esi], 0
jne 0x408186
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x408199
cmp al, 0xd
je 0x408199
cmp esi, dword [0x40e754]
jb 0x408096
jmp 0x4081f1
mov eax, dword [esp + 0x24]
xor esi, esi
push ebx
mov dword [0x40e740], esi
mov dword [0x40e76c], eax
mov dword [0x40e758], esi
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push esi
push dword [0x40e428]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x40e744], eax
cmp eax, esi
je 0x4081f1
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x40e740]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8