Function at 0x4a7f80
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x101c
call fcn.005322e0
push ebx
mov ebx, dword [esp + 0x1028]
mov dword [esp + 0x14], ecx
push ebp
movsx ecx, word [ebx + 4]
mov eax, ecx
push esi
cdq
and edx, 7
mov esi, dword [esp + 0x1034]
add eax, edx
push edi
mov edx, dword [esi]
sar eax, 3
mov dword [esp + 0x14], edx
movsx edx, word [esi + 2]
lea eax, [eax + eax*2]
lea ebp, [eax*8 + 0x6d7210]
mov eax, dword [esi + 4]
mov dword [esp + 0x18], eax
movsx eax, word [esi + 6]
sub eax, edx
inc eax
cmp ecx, eax
jge 0x4a7fd7
mov eax, ecx
mov ecx, dword [esp + 0x16]
lea edx, [eax + ecx - 1]
mov eax, dword [esp + 0x103c]
test eax, eax
mov word [esp + 0x1a], dx
mov dword [esp + 0x10], eax
jge 0x4a8008
mov edi, dword [esp + 0x1030]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], ecx
mov eax, dword [ebx]
and eax, 0xff000000
mov dword [esp + 0x1c], eax
mov al, byte [esp + 0x1f]
test al, al
je 0x4a80af
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x2e]
mov word [esp + 0x2c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x2c]
stosw word es:[edi], ax
mov eax, dword [esp + 0x1030]
push ecx
push edx
push eax
call fcn.0047a370
mov cl, byte [ebx + 7]
mov ebp, dword [esp + 0x104c]
add esp, 0xc
cmp cl, 3
jne 0x4a8088
test dword [0x67a960], ebp
jne 0x4a8088
mov edx, dword [esp + 0x1030]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x30]
push ecx
push edx
call fcn.0047a370
add esp, 0xc
mov edx, dword [esp + 0x1044]
mov ecx, dword [esp + 0x20]
push edx
push ebp
push eax
push esi
lea eax, [esp + 0x3c]
push ebx
push eax
call fcn.004a8530
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x101c
ret 0x18
mov al, byte [ebx + 7]
cmp al, 3
je 0x4a80be
cmp al, 1
jne 0x4a814c
mov esi, dword [esp + 0x1030]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jg 0x4a811b
mov ecx, 0x3ff
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
lea edi, [esp + 0x2c]
mov ecx, eax
push eax
mov edx, ecx
lea eax, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00479e30
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, dword [esp + 0x10]
mov dl, byte [ebx + 7]
sub eax, ecx
xor ecx, ecx
mov cl, byte [ebp + 4]
imul eax, ecx
xor ecx, ecx
cmp dl, 3
sete cl
cdq
inc ecx
idiv ecx
xor edx, edx
test eax, eax
setle dl
dec edx
and eax, edx
add word [esp + 0x14], ax
add word [esp + 0x18], ax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
js 0x4a83d9
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov ax, word [esp + 0x14]
cmp ax, word [esp + 0x18]
jg 0x4a83d9
mov cx, word [esp + 0x1a]
cmp word [esp + 0x16], cx
jg 0x4a83d9
mov ecx, dword [esp + 0x1030]
mov dl, byte [ecx]
inc ecx
mov byte [esp + 0x24], dl
mov dword [esp + 0x1030], ecx
mov eax, dword [esp + 0x24]
and eax, 0xff
je 0x4a83b9
cmp eax, 0x20
je 0x4a83b9
test byte [esp + 0x1040], 2
jne 0x4a8342
mov edx, dword [esp + 0x10]
test edx, edx
je 0x4a8342
mov dl, byte [ecx]
cmp dl, 0x40
jb 0x4a8342
mov cl, byte [ecx - 1]
cmp cl, 0x80
jbe 0x4a8342
test byte [esp + 0x1040], 4
jne 0x4a8201
cmp cl, 0xa0
jbe 0x4a833b
cmp dl, 0xa0
jbe 0x4a833b
mov al, byte [ebp + 0x11]
mov bl, byte [0x563624]
cmp al, bl
je 0x4a827c
cmp cl, 0xa0
jbe 0x4a827c
cmp dl, 0xa0
jbe 0x4a827c
cmp al, byte [0x563627]
jne 0x4a824e
mov edx, dword [esp + 0x1030]
mov dword [esp + 0x1c], 0
push 0x67a744
mov ax, word [edx - 1]
mov word [esp + 0x20], ax
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, 0x6d2ba0
call fcn.004cbfe0
jmp 0x4a82aa
mov edx, dword [esp + 0x1030]
mov dword [esp + 0x1c], 0
push 0x67a744
mov ax, word [edx - 1]
mov word [esp + 0x20], ax
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, 0x6d2ba0
call fcn.004cc050
jmp 0x4a82aa
mov edx, dword [esp + 0x1030]
mov ax, word [edx - 1]
mov word [esp + 0x28], ax
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0047a1a0
and eax, 0xffff
push 0x67a744
push ebp
push eax
call fcn.0047a560
add esp, 0x10
mov edx, dword [esp + 0x1030]
mov ecx, dword [esp + 0x10]
mov al, byte [ebp + 0x13]
inc edx
dec ecx
cmp al, 1
mov dword [esp + 0x1030], edx
mov dword [esp + 0x10], ecx
jbe 0x4a82f1
lea edx, [ebp + 0xc]
push edx
call fcn.0047a0e0
mov ebx, dword [esp + 0x1038]
add esp, 4
xor eax, eax
lea ecx, [esp + 0x14]
mov al, byte [ebp + 0x12]
mov edx, dword [ebx]
push eax
push ecx
push edx
push 0x678744
jmp 0x4a830b
mov ebx, dword [esp + 0x1034]
xor eax, eax
mov al, byte [ebp + 0x12]
lea ecx, [esp + 0x14]
mov edx, dword [ebx]
push eax
push ecx
push edx
push 0x67a744
mov ecx, dword [esp + 0x30]
call fcn.004a88b0
movzx ax, byte [ebp + 0x10]
add word [esp + 0x14], ax
mov al, byte [esp + 0x1040]
test al, 1
je 0x4a83ca
mov cx, word [ebp + 0x14]
add word [esp + 0x14], cx
jmp 0x4a83ca
mov ebx, dword [esp + 0x1034]
xor edx, edx
and eax, 0x7fff
mov dl, byte [ebp + 5]
mov ecx, dword [ebp]
imul eax, edx
add eax, ecx
push 0
push eax
mov eax, dword [0x67a8cc]
push eax
call esi
mov ecx, dword [0x67a8cc]
xor edx, edx
mov dl, byte [ebp + 5]
push ecx
push edx
push 1
push 0x67a744
call edi
mov al, byte [ebp + 7]
add esp, 0x1c
cmp al, 1
jbe 0x4a839d
push ebp
call fcn.0047a0e0
mov edx, dword [ebx]
add esp, 4
xor eax, eax
lea ecx, [esp + 0x14]
mov al, byte [ebp + 6]
push eax
push ecx
push edx
push 0x678744
jmp 0x4a83b0
mov edx, dword [ebx]
xor eax, eax
mov al, byte [ebp + 6]
lea ecx, [esp + 0x14]
push eax
push ecx
push edx
push 0x67a744
mov ecx, dword [esp + 0x30]
call fcn.004a88b0
movzx ax, byte [ebp + 4]
add eax, dword [esp + 0x1044]
add word [esp + 0x14], ax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jns 0x4a8167
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x101c
ret 0x18