Function at 0x405a80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x24
mov eax, dword [0x6ee2dc]
push ebx
push ebp
mov ebp, dword [esp + 0x30]
push esi
mov ebx, ecx
mov esi, 3
cmp dword [ebx + 0x324], esi
mov dword [esp + 0x2c], eax
push edi
je 0x405ac5
mov eax, dword [ebx + 0x328]
push 0
push 0
push ebp
push eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, ebp
jne 0x405b85
cmp dword [ebx + 0x324], esi
jne 0x405ada
mov esi, dword [ebx + 0x328]
add esi, ebp
mov ecx, 8
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
jmp 0x405b0c
mov eax, dword [ebx + 0x328]
push 0
lea ecx, [esp + 0x3c]
push ecx
push 0x20
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x4c], 0
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x405b85
cmp dword [esp + 0x38], 0x20
jne 0x405b85
cmp dword [esp + 0x10], 0x53564f4b
jne 0x405b85
mov ecx, dword [esp + 0x14]
add ebp, 0x20
sub esp, 0x10
mov dword [ebx + 0x330], ebp
mov ebp, esp
mov eax, 0x404cd0
mov dword [ebp], eax
push 0
mov dword [ebx + 0x32c], ecx
mov ecx, 0x404dd0
mov dword [ebp + 4], ecx
push 0
mov edx, 0x404f00
lea esi, [ebx + 0x10]
mov dword [ebp + 8], edx
push esi
mov edi, 0x404f10
push ebx
mov dword [ebx + 0x334], 0
mov dword [ebp + 0xc], edi
call fcn.00620360
add esp, 0x20
test eax, eax
jl 0x405b85
push 0xffffffffffffffff
push esi
call fcn.00621e30
add esp, 8
test eax, eax
jne 0x405b9d
push esi
call fcn.00620260
add esp, 4
mov eax, 0x80004005
mov ecx, dword [esp + 0x30]
call fcn.0062fcdf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov dword [ebx + 8], edx
cmp dword [eax + 4], 2
setle cl
test cx, cx
mov word [ebx + 0x2e2], cx
je 0x405c13
mov word [ebx + 0x2e0], 1
mov cx, word [eax + 4]
mov word [ebx + 0x2e2], cx
mov edx, dword [eax + 8]
movzx eax, cx
shl eax, 4
mov dword [ebx + 0x2e4], edx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov word [ebx + 0x2ec], ax
movzx eax, ax
imul eax, dword [ebx + 0x2e4]
mov word [ebx + 0x2ee], 0x10
mov word [ebx + 0x2f0], 0
mov dword [ebx + 0x2e8], eax
jmp 0x405cc4
mov word [ebx + 0x2e0], 0xfffe
mov cx, word [eax + 4]
mov word [ebx + 0x2e2], cx
mov edx, dword [eax + 8]
movzx eax, word [ebx + 0x2e2]
shl eax, 4
mov dword [ebx + 0x2e4], edx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov word [ebx + 0x2ec], ax
movzx eax, ax
imul eax, dword [ebx + 0x2e4]
mov dword [ebx + 0x2e8], eax
mov ecx, 0x10
mov word [ebx + 0x2ee], cx
mov word [ebx + 0x2f2], cx
mov word [ebx + 0x2f0], 0x16
mov edx, dword [0x6495d0]
lea ecx, [ebx + 0x2f8]
mov dword [ecx], edx
mov eax, dword [0x6495d4]
mov dword [ecx + 4], eax
mov edx, dword [0x6495d8]
mov dword [ecx + 8], edx
mov eax, dword [0x6495dc]
mov dword [ecx + 0xc], eax
movzx eax, word [ebx + 0x2e2]
sub eax, 4
je 0x405cba
sub eax, 2
jne 0x405cc4
mov dword [ebx + 0x2f4], 0x3f
jmp 0x405cc4
mov dword [ebx + 0x2f4], 0x33
push 0xffffffffffffffff
push esi
call fcn.00620f00
xor ecx, ecx
add esp, 8
or ecx, edx
je 0x405cf6
push esi
call fcn.00620260
add esp, 4
mov eax, 0x8000ffff
mov ecx, dword [esp + 0x30]
call fcn.0062fcdf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
mov ecx, dword [esp + 0x30]
mov dword [ebx + 0x320], eax
xor eax, eax
call fcn.0062fcdf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4