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

Disassembly:
sub esp, 0x5d0
push ebx
push ebp
mov ebp, dword [esp + 0x1458]
xor ebx, ebx
push esi
cmp ebp, ebx
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
je 0x40597c
mov esi, dword [esp + 0x1464]
cmp esi, ebx
je 0x40597c
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebp
call edi
push ebx
push esi
mov dword [esp + 0x20], eax
call edi
mov eax, dword [esp + 0x18]
mov byte [esp + 0x1e0], bl
test eax, eax
mov byte [esp + 0x3e0], bl
jbe 0x40597c
jmp 0x4057a2
mov ebp, dword [esp + 0x1460]
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x1464]
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x3e8]
push 0x200
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea edi, [esp + 0x1e0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
mov esi, ecx
mov eax, 0x200
sub eax, esi
push edx
lea ecx, [esp + esi + 0x1e8]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
push 0
add ebx, ecx
push 0
push ebx
push ebp
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x10]
lea ebx, [esp + 0x1e0]
add edx, esi
lea ebp, [esp + 0x3e0]
mov dword [esp + 0x10], edx
je 0x40596c
mov al, byte [ebx]
mov byte [esp + 0x60], 0
cmp al, 0x3b
lea ecx, [esp + 0x60]
je 0x405848
test edx, edx
jbe 0x405922
mov byte [ecx], al
mov al, byte [ebx + 1]
inc ecx
inc ebx
dec edx
cmp al, 0x3b
mov dword [esp + 0x10], edx
jne 0x405830
mov al, byte [ebp]
mov byte [ecx], 0
cmp al, 0x3b
mov byte [esp + 0x20], 0
lea ecx, [esp + 0x20]
je 0x405873
test al, al
je 0x405873
mov esi, dword [esp + 0x14]
mov byte [ecx], al
mov al, byte [ebp + 1]
inc ecx
inc ebp
inc esi
cmp al, 0x3b
mov dword [esp + 0x14], esi
jne 0x40585b
mov byte [ecx], 0
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea edx, [esp + 0x60]
dec ecx
push edx
je 0x4058a8
lea eax, [esp + 0x24]
lea ecx, [esp + 0xe4]
push eax
push str.To:__s__s__r_n
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x4058be
lea eax, [esp + 0xe4]
push str.To:__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov edx, dword [esp + 0x5e4]
lea ecx, [esp + 0xe0]
push ecx
push edx
call fcn.00404830
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
add esp, 8
inc ebx
inc ebp
inc ecx
dec edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
jne 0x405821
push 0
mov eax, ecx
mov ecx, dword [esp + 0x1468]
push 0
push eax
push ecx
mov byte [esp + 0x1f0], 0
mov byte [esp + 0x3f0], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x10]
test edx, edx
jbe 0x40596c
jmp 0x405821
mov byte [ecx], 0
lea edi, [esp + 0x60]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1e0]
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x1464]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x3e8], 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jb 0x405790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5d0
ret