Function at 0x409ec0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x624
mov eax, dword [0x4c1830]
mov ecx, dword [esp + 0x62c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x634]
push edi
mov dword [esp + 0x630], eax
movzx eax, byte [esi + 0x6e]
push 0
push eax
push ecx
lea edx, [esp + 0x3c]
push edx
mov dword [esp + 0x20], 0
call fcn.004020a0
movzx edx, byte [esi + 0x6b]
xor ecx, ecx
mov edi, eax
movsx ebx, byte [edi + 1]
movsx eax, byte [edi]
mov cl, 6
sub cl, dl
sar ebx, cl
mov ecx, edx
mov ebp, eax
shl ebp, cl
mov ecx, dword [esi + 0x7c]
add esp, 0x10
add ebx, ebp
mov ecx, dword [ecx + ebx*4]
test ecx, ecx
mov dword [esp + 0x1c], ecx
je 0x40a0c2
mov ecx, eax
call fcn.00409e70
mov cl, byte [edi]
test cl, cl
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
je 0x409fb0
mov edx, eax
movsx ecx, cl
and edx, 0xff
cmp ecx, edx
jne 0x409fb0
test eax, eax
jl 0x409fb0
sar eax, 8
mov ecx, eax
movsx eax, byte [edi + 1]
inc edi
add eax, ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esi + 0x80]
test ecx, ecx
je 0x409f75
mov eax, dword [ecx + eax*4]
jmp 0x409fa0
mov edx, dword [esi + 0x58]
mov ecx, dword [esi]
push 0
push 0
lea eax, [edx + eax*4]
push eax
push ecx
call ebx
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x24]
mov cl, byte [edi]
test cl, cl
jne 0x409f43
jmp 0x409fb0
cmp byte [esi + 0x69], 1
mov dword [esp + 0x18], 0
mov ebp, 1
jbe 0x40a032
mov edi, dword [esp + 0x10]
lea edi, [edi*4 + 4]
mov edi, edi
mov eax, dword [esi + 0x80]
test eax, eax
je 0x409fdf
mov eax, dword [edi + eax]
jmp 0x40a009
mov edx, dword [esi + 0x58]
mov eax, dword [esi]
push 0
push 0
add edx, edi
push edx
push eax
call ebx
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x2c]
push ecx
push 4
lea edx, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x20]
mov ecx, eax
and ecx, 0xff
cmp ebp, ecx
je 0x40a023
movzx edx, byte [esi + 0x69]
inc ebp
add edi, 4
cmp ebp, edx
jl 0x409fd0
jmp 0x40a032
sar eax, 8
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], 1
movzx eax, byte [esi + 0x69]
movzx ecx, byte [esi + 0x6a]
lea ebp, [eax + 1]
add ecx, eax
cmp ebp, ecx
jg 0x40a0b6
mov edx, dword [esp + 0x10]
lea edi, [edx + ebp]
shl edi, 2
lea ecx, [ecx]
mov eax, dword [esi + 0x80]
test eax, eax
je 0x40a05f
mov eax, dword [edi + eax]
jmp 0x40a089
mov eax, dword [esi + 0x58]
mov ecx, dword [esi]
push 0
push 0
add eax, edi
push eax
push ecx
call ebx
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x30]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov edx, eax
and edx, 0xff
cmp ebp, edx
jne 0x40a0a4
sar eax, 8
mov ecx, eax
not ecx
test ecx, 0x800000
jne 0x40a0db
movzx edx, byte [esi + 0x69]
movzx eax, byte [esi + 0x6a]
inc ebp
add edx, eax
add edi, 4
cmp ebp, edx
jle 0x40a050
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x409fb0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x620]
call fcn.0047471e
add esp, 0x624
ret
mov ecx, dword [esp + 0x1c]
and eax, 0x7ffff
add eax, ecx
mov ecx, dword [esp + 0x640]
pop edi
pop esi
mov dword [ecx], eax
mov ecx, dword [esp + 0x628]
pop ebp
mov eax, 1
pop ebx
call fcn.0047471e
add esp, 0x624
ret