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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x58f660]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov eax, dword [esi + 0x58]
push edi
mov ebx, ecx
shl eax, 9
push 0x405
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x230], 1
mov dword [ebp - 0x234], eax
call fcn.0041f6c2
add esp, 4
mov dword [ebp - 0x220], eax
test eax, eax
jne 0x418029
mov eax, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514194
mov esp, ebp
pop ebp
ret
push 0x103
lea eax, [ebp - 0x10f]
push 0
push eax
mov byte [ebp - 0x110], 0
call fcn.00518380
lea eax, [ebx + 0x5c]
lea edx, [ebp - 0x110]
add esp, 0xc
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x418051
cmp dword [esi + 0x30], 0x10
lea eax, [esi + 0x1c]
jb 0x418066
mov eax, dword [eax]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418068
lea edi, [ebp - 0x110]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x418078
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp byte [ebx + 0x35], 0
rep movsb byte es:[edi], byte [esi]
je 0x4180f3
push 0x103
lea ecx, [ebp - 0x217]
push 0
push ecx
mov byte [ebp - 0x218], 0
call fcn.00518380
add esp, 0xc
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x104
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00518380
add esp, 0xc
xor eax, eax
nop
mov cl, byte [ebp + eax - 0x218]
mov byte [ebp + eax - 0x110], cl
inc eax
test cl, cl
jne 0x4180e0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x22c], edi
cmp edi, 0xffffffff
jne 0x418145
mov edx, dword [ebp - 0x220]
push edx
call fcn.0041f6cd
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514194
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x35], 0
je 0x418177
mov esi, dword [ebp - 0x21c]
mov eax, dword [esi + 0x70]
cdq
shld edx, eax, 9
push edx
shl eax, 9
push eax
push edi
xor edx, edx
call fcn.0040e410
mov esi, dword [esi + 0x6c]
add esp, 0xc
shl esi, 9
mov dword [ebp - 0x21c], esi
jmp 0x418188
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x21c], eax
mov esi, eax
movzx eax, word [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
and eax, 0xff
push esi
shl eax, 0x10
or eax, 2
push eax
push 0x178c
push ecx
mov dword [ebp - 0x224], esi
call dword [sym.imp.USER32.dll_SendMessageA]
test esi, esi
je 0x418297
mov edx, dword [ebp - 0x220]
add edx, 5
mov dword [ebp - 0x23c], edx
jmp 0x4181d0
mov esi, dword [ebp - 0x224]
cmp esi, 0x400
jbe 0x4181e3
mov esi, 0x400
mov ecx, dword [ebp - 0x23c]
push 0
lea eax, [ebp - 0x238]
push eax
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x238], esi
jne 0x41827d
mov edx, dword [ebp - 0x234]
mov edi, dword [ebp - 0x220]
mov ebx, dword [ebx + 0x24]
push edx
mov ecx, esi
call fcn.0041a940
mov dword [ebp - 0x230], eax
test eax, eax
jne 0x41828b
mov edi, dword [ebp - 0x224]
mov eax, dword [ebp - 0x21c]
add dword [ebp - 0x234], esi
sub edi, esi
sub eax, edi
push eax
mov eax, dword [ebp - 0x228]
movzx ecx, word [eax + 0x2c]
mov edx, dword [eax + 0x30]
and ecx, 0xff
shl ecx, 0x10
or ecx, 3
push ecx
push 0x178c
push edx
mov dword [ebp - 0x224], edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [ebp - 0x228]
test edi, edi
mov edi, dword [ebp - 0x22c]
jne 0x4181d0
jmp 0x418297
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x230], eax
jmp 0x418297
mov ebx, dword [ebp - 0x228]
mov edi, dword [ebp - 0x22c]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
and eax, 0xff
push 0
shl eax, 0x10
or eax, 4
push eax
push 0x178c
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 0x220]
push edx
call fcn.0041f6cd
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x230]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00514194
mov esp, ebp
pop ebp
ret