Function at 0x4a7c60
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2010
call fcn.005322e0
push ebx
mov ebx, dword [esp + 0x201c]
push ebp
mov ebp, ecx
mov eax, dword [ebx]
push esi
and eax, 0xff000000
push edi
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x1b]
test al, al
mov dword [esp + 0x1c], ebp
je 0x4a7d31
call fcn.00487630
test byte [eax], 4
je 0x4a7cfa
mov eax, dword [esp + 0x2030]
mov esi, dword [esp + 0x2024]
lea edi, [esp + 0x20]
push eax
lea ecx, [eax + eax]
lea eax, [esp + 0x24]
mov edx, ecx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004a7ad0
mov ecx, dword [esp + 0x2040]
mov edx, dword [esp + 0x2034]
add esp, 8
push 0
push ecx
push eax
push edx
lea eax, [esp + 0x30]
push ebx
push eax
mov ecx, ebp
call fcn.004a8530
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2010
ret 0x18
mov ecx, dword [esp + 0x2038]
mov edx, dword [esp + 0x2030]
mov eax, dword [esp + 0x202c]
push 0
push ecx
mov ecx, dword [esp + 0x202c]
push edx
push eax
push ebx
push ecx
mov ecx, ebp
call fcn.004a8530
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2010
ret 0x18
movsx esi, word [ebx + 4]
mov eax, esi
mov ecx, dword [esp + 0x202c]
cdq
and edx, 7
add eax, edx
sar eax, 3
lea edx, [eax + eax*2]
mov eax, dword [ecx]
mov dword [esp + 0x10], eax
movsx eax, word [ecx + 6]
lea ebp, [edx*8 + 0x6d7210]
mov edx, dword [ecx + 4]
movsx ecx, word [ecx + 2]
sub eax, ecx
mov dword [esp + 0x14], edx
inc eax
cmp esi, eax
jge 0x4a7d6f
mov eax, esi
mov edx, dword [esp + 0x12]
mov bl, byte [ebx + 7]
cmp bl, 3
lea eax, [eax + edx - 1]
mov word [esp + 0x16], ax
je 0x4a7d89
cmp bl, 1
jne 0x4a7e08
mov edx, dword [esp + 0x2030]
mov esi, dword [esp + 0x2024]
xor ecx, ecx
lea eax, [edx - 1]
test eax, eax
jl 0x4a7dea
inc eax
mov dword [esp + 0x18], eax
mov dx, word [esi]
add esi, 2
cmp dx, 0x80
mov eax, 1
jae 0x4a7db9
xor eax, eax
mov edi, dword [esp + 0x2038]
lea eax, [eax + eax*2]
xor edx, edx
mov dl, byte [ebp + eax*4 + 4]
lea eax, [ebp + eax*4]
add edx, edi
add ecx, edx
mov edx, dword [esp + 0x2034]
test edx, edx
je 0x4a7ddf
add ecx, dword [eax + 8]
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x4a7da5
movsx eax, word [esp + 0x14]
movsx edx, word [esp + 0x10]
sub eax, edx
sub eax, ecx
inc eax
cmp bl, 3
jne 0x4a7e03
cdq
sub eax, edx
sar eax, 1
add word [esp + 0x10], ax
mov eax, dword [esp + 0x2030]
dec eax
mov dword [esp + 0x2030], eax
js 0x4a7f70
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
mov cx, word [esp + 0x10]
cmp cx, word [esp + 0x14]
jg 0x4a7f70
mov ax, word [esp + 0x16]
cmp word [esp + 0x12], ax
jg 0x4a7f70
mov eax, dword [esp + 0x2024]
mov edi, 1
mov cx, word [eax]
add eax, 2
cmp cx, 0x80
mov dword [esp + 0x2024], eax
jae 0x4a7e65
xor edi, edi
mov eax, ecx
and eax, 0xffff
je 0x4a7f24
cmp eax, 0x20
je 0x4a7f24
cmp cx, 0x80
jae 0x4a7ebe
xor ecx, ecx
and eax, 0x7fff
mov cl, byte [ebp + 5]
mov edx, dword [ebp]
imul eax, ecx
add eax, edx
mov edx, dword [0x67a8cc]
push 0
push eax
push edx
call ebx
mov eax, dword [0x67a8cc]
xor ecx, ecx
mov cl, byte [ebp + 5]
push eax
push ecx
push 1
push 0x67a744
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
jmp 0x4a7ecd
push 0x67a744
push ebp
push ecx
call fcn.0047a560
add esp, 0xc
lea edx, [edi + edi*2]
mov al, byte [ebp + edx*4 + 7]
lea esi, [ebp + edx*4]
cmp al, 1
jbe 0x4a7f01
push esi
call fcn.0047a0e0
mov edx, dword [esp + 0x202c]
add esp, 4
xor eax, eax
lea ecx, [esp + 0x10]
mov al, byte [esi + 6]
push eax
mov eax, dword [edx]
push ecx
push eax
push 0x678744
jmp 0x4a7f1b
mov eax, dword [esp + 0x2028]
xor ecx, ecx
mov cl, byte [esi + 6]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [eax]
push edx
push ecx
push 0x67a744
mov ecx, dword [esp + 0x2c]
call fcn.004a88b0
lea edx, [edi + edi*2]
mov edi, dword [esp + 0x2038]
mov cx, word [esp + 0x10]
lea eax, [ebp + edx*4]
movzx dx, byte [ebp + edx*4 + 4]
add edx, edi
add cx, dx
mov edx, dword [esp + 0x2034]
test edx, edx
mov word [esp + 0x10], cx
je 0x4a7f5b
add cx, word [eax + 8]
mov word [esp + 0x10], cx
mov eax, dword [esp + 0x2030]
dec eax
mov dword [esp + 0x2030], eax
jns 0x4a7e28
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2010
ret 0x18