Function at 0x403380
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x41b00c]
xor eax, esp
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, ecx
mov dword [esp + 8], eax
push edi
mov edi, dword [esi]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4033a7
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [esi + 8]
call fcn.004024a0
mov ecx, dword [esi + 8]
mov eax, dword [ecx - 8]
lea eax, [eax*2 + 2]
push eax
push edi
push ecx
call fcn.00407470
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 7
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0xc], eax
cmp eax, 0xffffffff
jne 0x4033ff
mov dword [esi + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x20]
lea edx, [esp + 0x20]
push 0
push edx
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x34]
push eax
push ecx
push dword [esi + 0xc]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x4034ab
mov eax, dword [eax + 8]
add eax, 0x100
push 1
push eax
call fcn.00408f20
mov ecx, dword [esi + 0x20]
add esp, 8
mov edi, eax
cmp dword [ecx + 0xc], 0
mov edx, dword [ecx + 8]
ja 0x403457
test edx, edx
je 0x403475
mov dword [esp + 0x1c], 0
test edx, edx
je 0x403475
push 0
lea eax, [esp + 0x20]
push eax
push edx
push edi
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40348a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], 0
mov eax, dword [esi + 0x20]
push dword [eax + 8]
push edi
push dword [esp + 0x14]
call fcn.00407470
add esp, 0xc
push edi
call fcn.004091b1
add esp, 4
jmp 0x403670
cmp ecx, 1
jne 0x403552
mov eax, dword [eax]
add eax, 0x100
push ecx
push eax
call fcn.00408f20
mov ecx, dword [esi + 0x20]
add esp, 8
mov edi, eax
cmp dword [ecx + 4], 0
mov eax, dword [ecx]
ja 0x4034d6
test eax, eax
je 0x4034f4
mov dword [esp + 0x1c], 0
test eax, eax
je 0x4034f4
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
push edi
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x403509
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], 0
mov eax, dword [esi + 0x20]
mov ecx, edi
mov eax, dword [eax + 0x14]
xor dword [edi], eax
lea eax, [esp + 0x1c]
mov esi, dword [esi + 0x20]
push eax
mov ebx, dword [esi]
mov edx, ebx
call fcn.004017e0
add esp, 4
test al, al
je 0x403544
mov eax, dword [esi + 8]
cmp eax, dword [esp + 0x1c]
jb 0x403544
push dword [esp + 0xc]
mov edx, ebx
mov ecx, edi
call fcn.00401aa0
add esp, 4
push edi
call fcn.004091b1
add esp, 4
jmp 0x403670
cmp dword [eax + 0xc], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
jb 0x40365b
ja 0x403571
cmp dword [eax + 8], 0
jbe 0x40365b
mov eax, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
nop word [eax + eax]
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [esi + 0xc]
call edi
mov eax, dword [esp + 0x18]
add eax, 0x100
push 1
push eax
call fcn.00408f20
mov ebx, eax
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x4035df
push 0
lea ecx, [esp + 0x24]
push ecx
push eax
push ebx
push dword [esi + 0xc]
call edi
mov eax, dword [esi + 0x20]
mov ecx, ebx
mov edi, dword [eax + 8]
mov eax, dword [eax + 0x14]
xor dword [ebx], eax
lea eax, [esp + 0x10]
mov edx, dword [esp + 0x18]
push eax
call fcn.004017e0
add esp, 4
test al, al
je 0x403620
cmp edi, dword [esp + 0x10]
jb 0x403620
push dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov ecx, ebx
call fcn.00401aa0
add esp, 4
test al, al
cmovne edi, dword [esp + 0x10]
push ebx
call fcn.004091b1
mov ecx, dword [esp + 0x18]
add esp, 4
mov eax, dword [esi + 0x20]
add ecx, edi
mov edi, dword [esp + 0x1c]
adc edi, 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edi
cmp edi, dword [eax + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jb 0x403590
ja 0x40365b
cmp ecx, dword [eax + 8]
jb 0x403590
mov eax, dword [esi + 0xc]
test eax, eax
je 0x403670
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], 0
mov ecx, dword [esp + 0x2c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405cb7
mov esp, ebp
pop ebp
ret 0xc