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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
push 0
push 7
push 3
push 0
push 1
push bind
push dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x18], ebx
cmp ebx, 0xffffffff
jne 0x405a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x405a78
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
test ecx, ecx
jne 0x405df9
cmp eax, 0x3200000
ja 0x405df9
push ecx
push eax
push str.File_size__I64u_n
push esi
call fcn.00401a80
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
add esp, 0x10
add ecx, 0x13ff
push 0
push 0x1400
adc eax, 0
push eax
push ecx
call fcn.0041dd10
mov ebx, eax
mov eax, dword [esi + 0xaae0]
lea edi, [ebx*4]
lea ecx, [eax + 1]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], eax
mov dword [esi + 0xaae0], ecx
test edi, edi
je 0x405deb
push edi
call fcn.00414cfb
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x405deb
push edi
push 0
push eax
call fcn.0041e930
xor edi, edi
add esp, 0xc
mov dword [ebp - 0x14], edi
test ebx, ebx
jle 0x405c71
lea eax, [ebx - 1]
mov dword [ebp - 0xc], edi
mov esi, 0x458
lea esp, [esp]
mov ebx, 0x1400
cmp edi, eax
jne 0x405b42
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
push 0
add ecx, 0xffffffff
push ebx
adc eax, 0xffffffff
push eax
push ecx
call fcn.004285f0
lea ebx, [eax + 1]
lea eax, [ebx + 0x458]
cmp eax, 0x458
mov edi, eax
cmovb edi, esi
mov dword [ebp - 0x20], eax
test edi, edi
je 0x405da8
push edi
call fcn.00414cfb
mov esi, eax
add esp, 4
test esi, esi
je 0x405da8
push edi
push 0
push esi
call fcn.0041e930
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 0x14]
mov ecx, 0x458
mov dword [eax + edi*4], esi
mov eax, dword [ebp - 0x20]
cmp eax, 0x458
cmovb eax, ecx
mov dword [esi], eax
mov eax, dword [ebp - 0x1c]
push 0x104
push dword [ebp + 8]
mov dword [esi + 0x10], eax
lea eax, [esi + 0x220]
push eax
mov dword [esi + 4], 0x30
call fcn.00414d8d
xor eax, eax
push 0x104
push dword [ebp + 0xc]
mov word [esi + 0x426], ax
lea eax, [esi + 0x18]
push eax
call fcn.00414d8d
xor eax, eax
mov word [esi + 0x21e], ax
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
add esp, 0x24
cdq
push 0
push 0
mov dword [esi + 0x440], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esi + 0x44c], edx
push dword [esi + 0x44c]
mov dword [esi + 0x448], eax
push dword [esi + 0x448]
mov eax, ebx
mov ebx, dword [ebp - 0x18]
cdq
push ebx
mov dword [esi + 0x444], ecx
mov dword [esi + 0x450], eax
mov dword [esi + 0x454], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x405d90
push 0
lea eax, [ebp - 0x24]
push eax
push dword [esi + 0x450]
lea eax, [esi + 0x458]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405d90
mov ebx, dword [ebp - 8]
add dword [ebp - 0xc], 0x1400
inc edi
mov dword [ebp - 0x14], edi
lea eax, [ebx - 1]
mov esi, 0x458
cmp edi, ebx
jl 0x405b20
mov esi, dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0xab10]
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x430
xor esi, esi
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x405cb0
push 0x430
push esi
push edi
call fcn.0041e930
add esp, 0xc
mov esi, edi
push 0x104
push dword [ebp + 8]
push esi
call fcn.00414d8d
xor eax, eax
push 0x104
push dword [ebp + 0xc]
mov word [esi + 0x206], ax
lea eax, [esi + 0x208]
push eax
call fcn.00414d8d
mov edi, dword [ebp - 0x10]
xor eax, eax
mov word [esi + 0x40e], ax
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x418], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x41c], eax
mov eax, dword [ebp - 0x1c]
add esp, 0x18
lea ecx, [edi + 0xab0c]
mov dword [esi + 0x420], 0
mov dword [esi + 0x424], 0
mov dword [esi + 0x410], eax
mov dword [esi + 0x428], 0
call fcn.00409c10
test al, al
je 0x405d47
mov ecx, dword [edi + 0xab2c]
mov eax, dword [edi + 0xab28]
mov dword [eax + ecx*4], esi
inc dword [edi + 0xab2c]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 4]
xor esi, esi
test ebx, ebx
jle 0x405d7c
lea esp, [esp]
mov eax, dword [edi + esi*4]
mov ecx, dword [ebp - 0x10]
push dword [eax]
push eax
push 0x84
call fcn.004082b0
test eax, eax
js 0x405db7
inc esi
cmp esi, ebx
jl 0x405d60
push edi
call fcn.00414cc3
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 4]
jmp 0x405dbf
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov dword [ebp + 8], 8
jmp 0x405dbf
mov eax, 0x13ab
mov dword [ebp + 8], eax
xor esi, esi
mov eax, dword [edi + esi*4]
test eax, eax
je 0x405dd1
push eax
call fcn.00414cc3
add esp, 4
inc esi
cmp esi, ebx
jl 0x405dc1
push edi
call fcn.00414cc3
mov eax, dword [ebp + 8]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push ecx
push eax
push str.File_size__d___50M_n
push esi
call fcn.00401a80
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 0xdf
pop ebx
mov esp, ebp
pop ebp
ret 8