Function at 0x418500
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.00418a15
mov ebx, dword [esp + 0x20]
cmp ebx, ebp
jne 0x41851f
mov ebx, 0x43e037
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 [0x44c0c0], ebp
call esi
mov dword [0x44c0b4], eax
cmp eax, 0xffffffff
jne 0x41858a
push ebp
push edi
push 3
push ebp
push 1
mov ebp, 0x80000000
push ebp
push ebx
call esi
mov dword [0x44c0b4], eax
cmp eax, 0xffffffff
jne 0x418575
push 0
push edi
push 3
push 0
push 3
push ebp
push ebx
call esi
mov dword [0x44c0b4], eax
mov dword [0x44c0c0], 1
cmp eax, 0xffffffff
je 0x418780
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 [0x44c0cc], ebp
mov dword [0x44c0e0], eax
cmp edi, ebx
jl 0x4185fe
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
lea eax, [esp + 0x1c]
push eax
push dword [0x44c0b4]
call esi
cmp dword [esp + 0x18], ebx
jne 0x4185ef
push ebx
lea eax, [esp + 0x14]
push 0x43e078
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4185ef
mov dword [0x44c0cc], 0xfde9
sub edi, ebx
jmp 0x4185fe
push ebp
push ebp
push ebp
push dword [0x44c0b4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebp
jle 0x418634
lea eax, [edi + 2]
push eax
push ebp
push dword [0x44b554]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x44c0c4], eax
cmp eax, ebp
je 0x4187bf
push ebp
lea ecx, [esp + 0x1c]
push ecx
push edi
push eax
push dword [0x44c0b4]
call esi
mov edi, dword [esp + 0x18]
mov eax, dword [0x44c0c4]
cmp eax, ebp
je 0x4187bf
xor ecx, ecx
mov word [eax + edi], cx
mov esi, dword [0x44c0c4]
lea eax, [esi + edi]
mov dword [0x44c0c8], eax
mov edi, 0x44c0d0
mov bl, 0xa
cmp esi, eax
jae 0x4187bf
mov al, byte [esi]
cmp al, 0x20
je 0x41866e
cmp al, 9
jne 0x418671
inc esi
jmp 0x418664
mov al, byte [esi]
cmp al, 0x3b
jne 0x4186b1
inc esi
cmp byte [esi], 0x20
jne 0x41867e
inc esi
push esi
push 2
push dword [esp + 0x1c]
push edi
call fcn.004184d0
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x4186a7
mov al, byte [esi]
cmp al, bl
je 0x418764
cmp al, 0xd
je 0x418764
inc esi
cmp byte [esi], 0
jne 0x418694
jmp 0x418764
cmp al, 0x5b
jne 0x4186fb
inc esi
push esi
push 1
push dword [esp + 0x1c]
push edi
call fcn.004184d0
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x4186db
mov al, byte [esi]
cmp al, 0x5d
je 0x4186e5
cmp al, bl
je 0x4186e0
cmp al, 0xd
je 0x4186e0
inc esi
cmp byte [esi], 0
jne 0x4186cc
cmp byte [esi], 0x5d
jne 0x418764
mov byte [esi], 0
jmp 0x4186f2
cmp al, bl
je 0x418767
cmp al, 0xd
je 0x418768
inc esi
mov al, byte [esi]
test al, al
jne 0x4186ea
jmp 0x418768
cmp al, bl
je 0x418768
cmp al, 0xd
je 0x418768
mov edx, esi
jmp 0x418716
cmp al, 0x3d
je 0x41871a
cmp al, 0xd
je 0x41871a
cmp al, bl
je 0x41871a
inc esi
mov al, byte [esi]
test al, al
jne 0x418707
lea eax, [esi - 1]
jmp 0x41872c
mov cl, byte [eax]
cmp cl, 0x20
je 0x41872b
cmp cl, 9
jne 0x418730
dec eax
cmp eax, edx
ja 0x41871f
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x418734
cmp al, 9
je 0x418734
push esi
push edx
push dword [esp + 0x1c]
push edi
call fcn.004184d0
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x41875f
mov al, byte [esi]
cmp al, bl
je 0x418764
cmp al, 0xd
je 0x418764
inc esi
cmp byte [esi], 0
jne 0x418754
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x418767
cmp al, 0xd
je 0x418767
cmp esi, dword [0x44c0c8]
jb 0x418664
jmp 0x4187bf
mov eax, dword [esp + 0x24]
xor esi, esi
push ebx
mov dword [0x44c0b4], esi
mov dword [0x44c0e0], eax
mov dword [0x44c0cc], esi
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push esi
push dword [0x44b554]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x44c0b8], eax
cmp eax, esi
je 0x4187bf
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x44c0b4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8