Function at 0x4074f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x42f00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x1c], ebx
mov edi, 0x10
lea esi, [ebx + 0x5c]
mov ecx, esi
call fcn.0040ad20
add esi, 0x14
sub edi, 1
jne 0x407510
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x407534
push 0x30
push eax
call fcn.0040bc4d
add esp, 8
mov dword [ebx + 0xc], edi
mov edx, dword [ebp + 0xc]
lea edi, [ebx + 8]
mov eax, dword [ebp + 8]
test edx, edx
jne 0x407546
cmp eax, 0x10
jb 0x4075a8
mov ecx, dword [edi]
cmp dword [ecx + 0x70], 0
je 0x4075a8
mov ecx, dword [ecx + 0x10]
mov eax, edx
mul ecx
mov esi, eax
mov eax, dword [ebp + 8]
mul ecx
mov dword [ebp - 0x18], eax
add esi, edx
mov eax, dword [edi]
mov dword [ebp - 0x14], esi
push dword [eax + 0x10]
call fcn.0040c3b7
mov edx, dword [edi]
add esp, 4
mov ebx, eax
lea eax, [ebp - 8]
mov ecx, dword [edx + 0x70]
push eax
push dword [edx + 0x10]
lea eax, [ebp - 0x18]
mov esi, dword [ecx]
push ebx
push eax
call dword [esi + 0xc]
test eax, eax
je 0x40759b
mov ecx, dword [edi]
mov eax, dword [ebp - 8]
cmp eax, dword [ecx + 0x10]
je 0x407623
push 0x30
push ebx
call fcn.0040bc4d
add esp, 8
jmp 0x407627
mov esi, dword [edi]
push edx
push eax
push 0
push dword [esi + 0x10]
call fcn.0041da00
add eax, dword [esi + 0x18]
lea ecx, [ebp - 0xc]
push 0
adc edx, dword [esi + 0x1c]
push ecx
push eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x4075e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40762a
mov eax, dword [edi]
push dword [eax + 0x10]
call fcn.0040c3b7
add esp, 4
lea ecx, [ebp - 8]
mov ebx, eax
mov eax, dword [edi]
push 0
push ecx
push dword [eax + 0x10]
push ebx
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407616
mov ecx, dword [edi]
mov eax, dword [ebp - 8]
cmp eax, dword [ecx + 0x10]
je 0x407623
push 0x30
push ebx
call fcn.0040bc4d
add esp, 8
xor ebx, ebx
test ebx, ebx
jne 0x40763d
mov ebx, dword [ebp - 0x1c]
mov dword [ebx + 0x10], 0xffffffff
mov dword [ebx + 0x14], 0xffffffff
jmp 0x4076d0
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x14], eax
cmp dword [ebx], 0x454c4946
jne 0x4076c5
movzx eax, word [ebx + 4]
xor edx, edx
add eax, ebx
movzx ecx, word [eax]
add eax, 2
mov dword [ebp - 0x20], eax
mov eax, dword [edi]
mov dword [ebp - 0x1c], ecx
movzx ecx, word [eax + 8]
mov eax, dword [eax + 0x10]
div ecx
xor edx, edx
mov ecx, eax
mov eax, ebx
mov dword [ebp - 0x24], ecx
test ecx, ecx
jle 0x4076aa
mov ecx, dword [edi]
movzx ecx, word [ecx + 8]
shr ecx, 1
lea ecx, [eax + ecx*2]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
cmp word [ecx - 2], ax
jne 0x4076c5
mov eax, dword [ebp - 0x20]
mov ax, word [eax + edx*2]
inc edx
mov word [ecx - 2], ax
mov eax, ecx
cmp edx, dword [ebp - 0x24]
jl 0x407680
mov dword [esi + 0xc], ebx
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040bc0c
mov esp, ebp
pop ebp
ret 8
push 0x30
push ebx
call fcn.0040bc4d
add esp, 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040bc0c
mov esp, ebp
pop ebp
ret 8