Function at 0x402a04
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 4], 0
push eax
push 0x8000000
push 3
push eax
mov esi, ecx
push 3
push SysReAllocString
push dword [ebp + 8]
mov dword [esi + 0x820], 0xffffffff
mov byte [esi + 0x1030], 0
mov word [esi + 0x1032], ax
mov byte [esi + 0x1432], al
mov word [esi + 0x1434], ax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x39ec], eax
cmp eax, 0xffffffff
jne 0x402844
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, 0xbba
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea edi, [esi + 0x39f8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x39f4], eax
cmp eax, 0x80000000
jae 0x402ed2
cmp dword [edi], 0
ja 0x402ed2
xorps xmm0, xmm0
mov dword [esi + 0x39c0], 0
mov eax, 1
mov byte [esi + 0x39c4], 0
mov word [esi + 0x39b8], ax
xor eax, eax
push 0x1000
mov dword [esi + 0x39dc], eax
mov dword [esi + 0x39e0], eax
mov dword [esi + 0x39e4], eax
mov word [esi + 0x3a0c], 0x101
mov dword [esi + 0x39c6], eax
mov word [esi + 0x39e8], ax
mov dword [esi + 0x39cc], eax
mov dword [esi + 0x39d0], eax
movups xmmword [esi + 0x1870], xmm0
mov word [esi + 0x18d8], ax
movups xmmword [esi + 0x1880], xmm0
movups xmmword [esi + 0x1890], xmm0
movups xmmword [esi + 0x18a0], xmm0
movups xmmword [esi + 0x18b0], xmm0
movups xmmword [esi + 0x18c0], xmm0
movsd qword [esi + 0x18d0], xmm0
call fcn.0056654e
add esp, 4
mov dword [esi + 0x39bc], eax
lea ebx, [esi + 0x39fc]
push 0
push ebx
push 0x1000
push eax
push dword [esi + 0x39ec]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402960
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
push dword [esi + 0x39ec]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x39bc]
call fcn.00565fd3
add esp, 4
mov eax, 0xbbc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esi + 0x39f4], 0x7a120
jbe 0x402996
mov eax, dword [esi + 0x3a08]
push 0x5a9f58
push 0
push 0x801d
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esi + 0x3a08]
push 5
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [ebx], 0
jbe case.default.0x4029c1
mov ecx, esi
call fcn.00402fb0
movsx ecx, word [esi + 0x3932]
mov dx, ax
dec ecx
mov word [esi + 0x39ba], dx
cmp ecx, 0xb
ja case.default.0x4029c1
jmp dword [ecx*4 + 0x402ef8]
mov eax, 5
jmp 0x402a45
mov eax, 9
jmp 0x402a45
mov eax, 8
jmp 0x402a45
cmp dx, 6
je case.default.0x4029c1
mov eax, 7
jmp 0x402a45
cmp dx, 1
je case.default.0x4029c1
mov eax, 3
jmp 0x402a45
cmp dx, 2
je case.default.0x4029c1
mov eax, 4
jmp 0x402a45
cmp dx, 0xb
je case.default.0x4029c1
mov eax, 0xc
jmp 0x402a45
mov eax, 0xa
jmp 0x402a45
mov eax, 0xd
jmp 0x402a45
xor eax, eax
cmp dx, 6
setne al
add eax, 0xe
jmp 0x402a45
cmp dx, 0x10
je case.default.0x4029c1
mov eax, 0x12
jmp 0x402a45
cmp dx, 0x11
je case.default.0x4029c1
mov eax, 0x13
mov word [esi + 0x39ba], ax
push dword [esi + 0x39bc]
call fcn.00565fd3
add esp, 4
push 0x1000
call fcn.0056654e
add esp, 4
mov dword [esi + 0x39bc], eax
push 0
push 0
push 0
push dword [esi + 0x39ec]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebx], 1
nop word [eax + eax]
mov eax, dword [ebp + 0x14]
cmp byte [eax + 0x2083d], 0
jne 0x402ea1
mov eax, dword [esi + 0x39f4]
cmp eax, 0x7a120
jbe 0x402b00
movd xmm1, dword [esi + 0x39cc]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm0, qword [eax*8 + 0x5ea8e0]
divsd xmm1, xmm0
mulsd xmm1, qword [0x5ea660]
cvttsd2si edi, xmm1
cmp edi, dword [ebp - 4]
je 0x402b00
call fcn.0040f410
mov eax, dword [esi + 0x3a08]
push edi
push 0
push 0x801c
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 4], edi
push 0
push ebx
push 0x1000
push dword [esi + 0x39bc]
push dword [esi + 0x39ec]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402e51
movsx eax, word [esi + 0x39ba]
mov ecx, dword [ebx]
dec eax
add dword [esi + 0x39cc], ecx
cmp eax, 0x12
ja 0x402dc4
test ecx, ecx
je 0x402c94
jmp dword [eax*4 + 0x402f28]
movzx eax, byte [eax + 0x402f9c]
jmp dword [eax*4 + 0x402f74]
cmp dword [esi + 0x39d0], 0
jg 0x402dd6
cmp dword [ebx], 0
jne 0x402a90
cmp dword [esi + 0x39f4], 0x7a120
jbe 0x402df3
mov eax, dword [esi + 0x3a08]
push 0
push dword [eax]
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
push dword [esi + 0x39ec]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x39bc]
call fcn.00565fd3
xor eax, eax
add esp, 4
mov word [esi + 0x3132], ax
mov word [esi + 0x3532], ax
mov word [esi + 0x418], ax
cmp dword [esi + 0x39d0], eax
jne 0x402e3f
cmp dword [esi + 0x39cc], eax
setne al
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, esi
call fcn.00406880
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
push dword [esi + 0x39ec]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x39bc]
call fcn.00565fd3
add esp, 4
cmp dword [esi + 0x39f4], 0x7a120
jbe 0x402e93
mov eax, dword [esi + 0x3a08]
push 0
push dword [eax]
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
mov eax, 0xbbc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0xc]
push dword [esi + 0x39ec]
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x39bc]
call fcn.00565fd3
add esp, 4
mov eax, 0x270f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push dword [esi + 0x39ec]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov dword [eax], 0
mov eax, 0xbbb
mov esp, ebp
pop ebp
ret 0x10