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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46bc53
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push esi
push edi
mov eax, dword [0x48d814]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x4c]
push ecx
call fcn.00407c70
add esp, 8
mov dword [ebp - 4], 0
mov esi, 8
cmp dword [eax + 0x18], esi
jb 0x40a3b0
mov eax, dword [eax + 4]
jmp 0x40a3b3
add eax, 4
push 0
push 0x8000000
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], esi
jb 0x40a3e6
mov edx, dword [ebp - 0x48]
push edx
call fcn.00450138
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], 0
mov word [ebp - 0x48], ax
cmp edi, 0xffffffff
jne 0x40a41d
mov ecx, dword [ebp - 0x10]
call fcn.0040a190
mov dword [ebp - 4], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x24]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40a439
mov ecx, dword [ebp - 0x10]
call fcn.0040a190
jmp 0x40a573
push 0xc
lea ecx, [ebp - 0x30]
call fcn.0042c810
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
push 4
lea edx, [ebp + 8]
push edx
mov dword [ebp + 8], 0
call fcn.0042abe0
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
push esi
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x2c]
push edx
mov dword [ebp - 0x1c], eax
call fcn.0042abe0
lea ecx, [ebp - 0x30]
call fcn.0042c800
mov ecx, dword [ebp - 0x10]
push eax
call fcn.00409b00
test al, al
je 0x40a567
mov eax, dword [ebp - 0x24]
or eax, dword [ebp - 0x20]
je 0x40a567
lea ebx, [ebx]
push 0x1c
call fcn.004508b4
add esp, 4
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x40a4c7
push 0
push 0x1000
mov ecx, eax
call fcn.0042ae70
mov esi, eax
jmp 0x40a4c9
xor esi, esi
mov byte [ebp - 4], 3
mov eax, dword [esi + 4]
test eax, eax
je 0x40a4d9
mov edx, dword [eax + 8]
jmp 0x40a4db
xor edx, edx
test eax, eax
je 0x40a4e9
mov ecx, dword [eax + 4]
mov eax, dword [esi + 0x18]
add eax, ecx
jmp 0x40a4eb
xor eax, eax
push 0
lea ecx, [ebp + 8]
push ecx
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a532
mov eax, dword [ebp + 8]
test eax, eax
je 0x40a560
mov ecx, dword [ebp - 0x10]
add dword [esi + 0x18], eax
push esi
call fcn.00409b00
mov ecx, esi
test al, al
je 0x40a562
call fcn.0042ab40
cmp dword [ebp + 8], 0x1000
jb 0x40a567
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40a4a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.read_file_failed.__d.
push 0xc8
call fcn.00426560
push eax
call fcn.00426520
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x10]
add esp, 0x10
test ecx, ecx
je 0x40a560
call fcn.00428c50
mov ecx, esi
call fcn.0042ab40
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.0042c7f0
mov dword [ebp - 4], 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4