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

Disassembly:
sub esp, 0x240
mov eax, dword [0x411020]
xor eax, esp
mov dword [esp + 0x23c], eax
mov eax, dword [esp + 0x244]
push ebx
push ebp
mov ebp, dword [esp + 0x254]
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x26c]
push 0x80000000
push eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x24], ebx
je 0x4053dc
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
lea edx, [esp + 0x24]
push edx
push 8
lea eax, [esp + 0x34]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ebx, [esi - 8]
test bl, 0xf
je 0x4053e3
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055a7
push ebx
call dword [sym.imp.MSVCR80.dll_malloc]
mov edx, dword [esp + 0x2c]
mov dword [ebp], edx
lea ebp, [esi - 8]
add esp, 4
test ebp, ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x19
jbe 0x40547e
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x24]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40547e
add edi, dword [esp + 0x20]
mov eax, ebp
cdq
and edx, 0x3ff
add eax, edx
mov ecx, eax
sar ecx, 0xa
xor edx, edx
test ecx, ecx
mov eax, edi
jle 0x405449
shr eax, 0xa
imul eax, eax, 0x64
div ecx
jmp 0x40544e
imul eax, eax, 0x64
div ebp
mov esi, eax
shr esi, 2
cmp dword [esp + 0x18], esi
je 0x40547a
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push esi
push 0
push 0x4e20
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x14
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, ebp
jb 0x405407
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
push 0x19
push 0
push 0x4e20
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov esi, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x239], eax
mov dword [esp + 0x23d], eax
mov dword [esp + 0x241], eax
mov dword [esp + 0x245], eax
mov eax, esi
mov byte [esp + 0x238], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4054c3
sub eax, ecx
push eax
lea edi, [esp + 0x23c]
mov ecx, esi
call fcn.00407dc0
mov ecx, edi
push ecx
lea eax, [esp + 0x38]
call fcn.00406920
xor esi, esi
add esp, 8
cmp ebp, esi
mov dword [esp + 0x14], esi
jbe 0x405582
mov eax, ebp
cdq
and edx, 0x3ff
add eax, edx
mov edi, eax
sar edi, 0xa
xor ebx, ebx
lea esp, [esp]
mov edx, dword [esp + 0x1c]
lea ecx, [esi + edx]
push ecx
lea eax, [esp + 0x34]
push eax
call fcn.00406e10
add esp, 8
xor edx, edx
test edi, edi
jle 0x405537
mov eax, esi
shr eax, 0xa
imul eax, eax, 0x64
div edi
jmp 0x40553b
mov eax, ebx
div ebp
mov esi, eax
shr esi, 2
add esi, 0x19
cmp dword [esp + 0x18], esi
je 0x40556a
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
push esi
push 0
push 0x4e20
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x14
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [esp + 0x14]
add esi, 1
mov dword [esp + 0x14], esi
shl esi, 4
add ebx, 0x640
cmp esi, ebp
jb 0x405510
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 0x32
push 0
push 0x4e20
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040aad0
add esp, 0x240
ret 0xc