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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47ca8d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4b41e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x20], ebx
mov eax, dword [ebx]
mov edi, dword [ebp + 8]
cmp eax, 0xffffffff
je 0x40a692
test eax, eax
je 0x40a692
mov eax, dword [edi]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x40a47c
push eax
call fcn.00469e73
add esp, 4
mov dword [edi], 0
mov dword [edi + 4], 0
mov byte [edi + 8], 1
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x40a4a3
test eax, eax
je 0x40a4a3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
jmp 0x40a4a5
xor eax, eax
lea esi, [eax + 2]
mov dword [ebp - 0x24], eax
xorps xmm0, xmm0
push esi
movlpd qword [ebp - 0x1c], xmm0
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x28], eax
mov ebx, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], esi
mov eax, dword [ebp - 0x24]
xor edx, edx
mov esi, dword [ebp - 0x20]
mov ecx, eax
shr ecx, 1
mov dword [ebp - 4], 0
push edx
mov dword [ebp - 0x24], ecx
mov word [ebx + ecx*2], dx
lea ecx, [ebp - 0x14]
push ecx
push eax
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a4fb
xor esi, esi
jmp 0x40a67e
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax], 0
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax + 1], 0
mov eax, dword [esi + 4]
test al, 0x20
je 0x40a539
mov eax, dword [edi]
mov dword [ebp - 0x28], 0
test eax, eax
je 0x40a527
push eax
call fcn.00469e73
add esp, 4
mov dword [edi], ebx
mov dword [edi + 4], 0
mov byte [edi + 8], 1
jmp 0x40a661
test al, 0x40
je 0x40a54d
push dword [ebp - 0x24]
mov ecx, edi
push ebx
call fcn.00403090
jmp 0x40a661
mov cl, byte [ebx]
xor esi, esi
test eax, 0x180
je 0x40a5d7
test cl, cl
je 0x40a567
nop dword [eax]
inc esi
cmp byte [esi + ebx], 0
jne 0x40a560
mov eax, dword [edi]
xor ecx, ecx
mov dword [ebp - 0x20], eax
mov edx, 2
lea eax, [esi + 2]
mov dword [edi + 4], 0
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov dword [edi], eax
lea ecx, [esi + 1]
xor edx, edx
add esp, 4
mov word [eax + ecx*2], dx
mov eax, dword [edi]
mov word [eax], dx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40a5b2
push eax
call fcn.00469e73
add esp, 4
lea ecx, [esi + 1]
mov eax, dword [edi]
test eax, eax
je 0x40a661
test esi, esi
jne 0x40a5ca
xor ecx, ecx
mov word [eax], cx
jmp 0x40a661
push ecx
push eax
push esi
push ebx
push 0
push 0xfde9
jmp 0x40a64b
test cl, cl
je 0x40a5e7
nop dword [eax + eax]
inc esi
cmp byte [esi + ebx], 0
jne 0x40a5e0
mov eax, dword [edi]
xor ecx, ecx
mov dword [ebp - 0x20], eax
mov edx, 2
lea eax, [esi + 2]
mov dword [edi + 4], 0
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov dword [edi], eax
lea ecx, [esi + 1]
xor edx, edx
add esp, 4
mov word [eax + ecx*2], dx
mov eax, dword [edi]
mov word [eax], dx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40a632
push eax
call fcn.00469e73
add esp, 4
lea ecx, [esi + 1]
mov eax, dword [edi]
test eax, eax
je 0x40a661
test esi, esi
jne 0x40a643
xor ecx, ecx
mov word [eax], cx
jmp 0x40a661
push ecx
push eax
push esi
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [edi]
xor edx, edx
test eax, eax
mov word [ecx + eax*2], dx
setg al
mov byte [edi + 8], al
mov esi, dword [edi + 4]
test esi, esi
jne 0x40a67e
mov eax, dword [edi]
test eax, eax
je 0x40a67b
cmp word [eax], si
je 0x40a67b
inc esi
cmp word [eax + esi*2], 0
jne 0x40a673
mov dword [edi + 4], esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40a68e
push eax
call fcn.00469e73
add esp, 4
mov eax, esi
jmp 0x40a694
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00469e65
mov esp, ebp
pop ebp
ret 8