Function at 0x408b40
Capabilities:
Read file on windows

Disassembly:
push ebp
xor ebp, ebp
push edi
mov edx, ebp
push esi
push ebx
sub esp, 0x4c
imul eax, dword [esp + 0x60], 0xa48
lea ecx, [eax + 0x248]
lea ebx, [eax + 0x4509d8]
mov dword [esp + 0x24], ecx
lea esi, [eax + 0x4507c0]
lea esi, [esi]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], edx
lea ebp, [edx + eax + 0x4507c0]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov eax, dword [esi + 0x210]
mov dword [esi + 0x228], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], ebp
mov eax, dword [esi + 0x20c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x408bec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x408e18
lea edi, [esp + 0x3c]
mov dword [esp + 0xc], 1
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [esi + 0x20c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
sub esp, 0x10
cmp dword [esp + 0x3c], 1
jne 0x408b7f
mov eax, dword [esi + 0x210]
mov edx, dword [esp + 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
call eax
sub esp, 4
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x408cb0
cmp edx, 1
je 0x408c90
movzx eax, byte [esi + 0x24a]
cmp al, 1
je 0x408e20
cmp al, 0xb
ja 0x408cc8
mov dword [esp + 0xc], 1
mov eax, dword [0x45929c]
mov dword [esp + 8], 9
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call dword [sym.imp.USER32.dll_PostMessageW]
xor edx, edx
sub esp, 0x10
jmp 0x408b70
movzx eax, byte [esi + 0x249]
mov edx, 2
cmp al, 0x55
je 0x408b70
xor edx, edx
cmp al, 0xaa
sete dl
jmp 0x408b70
xor edx, edx
cmp byte [esi + 0x248], 0xaa
sete dl
jmp 0x408b70
mov ebp, 3
lea esi, [esi]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov eax, dword [esi + 0x210]
mov dword [esi + 0x228], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
movzx eax, byte [esi + 0x24a]
sub eax, ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
lea eax, [ebp + eax + 0x4507c0]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x20c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x408d4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x408e18
mov dword [esp + 0xc], 1
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [esi + 0x20c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov eax, dword [esi + 0x210]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [esp + 0x28]
call eax
movzx eax, byte [esi + 0x24a]
sub esp, 4
add ebp, dword [esp + 0x3c]
cmp eax, ebp
jg 0x408cd0
mov dword [esp + 0x28], eax
movzx eax, word [0x450060]
movzx edx, word [0x450062]
mov dword [esp + 8], 4
shl eax, 0x10
mov dword [esp + 4], edi
or eax, edx
mov dword [esp], 0xffffffff
add eax, 1
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
lea ebp, [eax + 0x4507c0]
call fcn.00401f50
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ebp
mov dword [esp], eax
sub ecx, 4
mov dword [esp + 8], ecx
call fcn.00401f50
mov edx, eax
movzx eax, byte [esi + 0x24a]
shr al, 2
movzx eax, al
cmp dword [ebp + eax*4 - 4], edx
je 0x408f62
mov dword [esp + 0xc], 2
jmp 0x408c64
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
imul edx, dword [esp + 0x60], 0xa48
mov ecx, 3
mov dword [esp + 0x2c], esi
mov esi, ecx
lea ebp, [edx + 0x4507c0]
mov eax, ebp
mov ebp, ebx
mov ebx, eax
nop
mov dword [ebp], 0
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 0x10], 0
mov eax, dword [ebx + 0x210]
mov dword [ebx + 0x228], eax
mov eax, 0x4c8
sub eax, esi
mov dword [esp + 0x10], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], 0
lea eax, [esi + eax + 0x4507c0]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x408ebc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x408e18
mov dword [esp + 0xc], 1
mov dword [esp + 8], edi
mov dword [esp + 4], ebp
mov eax, dword [ebx + 0x20c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov eax, dword [ebx + 0x210]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [esp + 0x28]
call eax
sub esp, 4
add esi, dword [esp + 0x3c]
cmp esi, 0x4c7
jle 0x408e40
movzx eax, word [0x450060]
movzx edx, word [0x450062]
mov dword [esp + 4], edi
mov ebx, ebp
mov dword [esp + 8], 4
mov esi, dword [esp + 0x2c]
shl eax, 0x10
mov dword [esp], 0xffffffff
or eax, edx
add eax, 1
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
lea ebp, [eax + 0x4507c0]
call fcn.00401f50
mov dword [esp + 8], 0x4c4
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.00401f50
cmp dword [ebp + 0x4c4], eax
jne 0x408e04
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.00408390
xor edx, edx
jmp 0x408b70