Function at 0x40a4b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x70]
xor ebx, ebx
test al, 4
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
je 0x40a554
test al, 0x10
je 0x40a519
mov edi, dword [esp + 0x2c]
mov ebx, dword [esi + 0x74]
xor edx, edx
mov eax, edi
div ebx
mov ecx, dword [esi + 0x88]
movzx ecx, word [ecx + edi*2]
mov ebp, dword [esi + 0x84]
inc edi
mov edx, dword [ebp + eax*4]
lea ecx, [edx + ecx*4]
xor edx, edx
mov eax, edi
div ebx
mov edx, dword [esi + 0x88]
mov dword [esp + 0x14], ecx
movzx edx, word [edx + edi*2]
mov eax, dword [ebp + eax*4]
lea eax, [eax + edx*4]
jmp 0x40a6c2
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi + 0x84]
lea eax, [edx + ecx*4]
mov ecx, dword [eax]
test ecx, ecx
mov dword [esp + 0x14], ecx
jns 0x40a53f
and ecx, 0x7fffffff
lea eax, [edx + ecx*4]
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov edx, eax
mov eax, dword [edx + 4]
add edx, 4
test eax, eax
mov dword [esp + 0x18], eax
js 0x40a541
jmp 0x40a6c2
test al, 0x10
push ebx
push ebx
je 0x40a637
mov ecx, dword [esi + 0x74]
mov edi, dword [esp + 0x34]
xor edx, edx
mov eax, edi
div ecx
xor edx, edx
mov ebp, eax
lea eax, [edi + 1]
div ecx
movsx edx, bp
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x5c]
lea ecx, [eax + edx*4]
mov edx, dword [esi]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x24]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push edx
call ebx
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40a5d0
cmp bp, word [esp + 0x1c]
je 0x40a5c8
mov eax, dword [esi]
push eax
push 1
lea ecx, [esp + 0x20]
push 4
push ecx
call fcn.00408520
add esp, 0x10
jmp 0x40a5d0
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
mov eax, dword [esi + 0x60]
mov edx, dword [esi]
push 0
push 0
lea ecx, [eax + edi*2]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi]
push 0
lea eax, [esp + 0x24]
push eax
push 2
lea ecx, [esp + 0x34]
push ecx
push edx
call ebx
movzx eax, word [esp + 0x28]
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x30]
test eax, eax
mov dword [esp + 0x14], ecx
je 0x40a6ce
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x24]
push edx
push 2
lea eax, [esp + 0x1c]
push eax
push ecx
call ebx
movzx edx, word [esp + 0x10]
mov eax, dword [esp + 0x18]
lea eax, [eax + edx*4]
jmp 0x40a6be
mov ecx, dword [esi + 0x5c]
mov edx, dword [esp + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ecx + edx*4]
mov ecx, dword [esi]
push eax
push ecx
call ebx
mov ecx, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x2c]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push ecx
call edi
mov ecx, dword [esp + 0x14]
test ecx, ecx
jns 0x40a69b
mov edx, dword [esi + 0x5c]
push 0
and ecx, 0x7fffffff
push 0
lea eax, [edx + ecx*4]
mov ecx, dword [esi]
push eax
push ecx
call ebx
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x2c]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push ecx
call edi
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40a6ce
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x2c]
push edx
push 4
lea eax, [esp + 0x24]
push eax
push ecx
call edi
mov eax, dword [esp + 0x18]
test eax, eax
js 0x40a6a3
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
test edx, edx
je 0x40a6ce
sub eax, ecx
mov dword [edx], eax
mov eax, dword [esi + 0x64]
pop edi
pop esi
pop ebp
add eax, ecx
pop ebx
add esp, 0x14
ret