Function at 0x4a7195
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.004a59c0
mov eax, dword [0x5be670]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1020], ebx
or ebx, ebx
jne 0x4a71d2
call fcn.004a93f4
mov dword [eax], 0x16
call fcn.004a9385
or eax, 0xffffffff
jmp 0x4a74e1
push esi
push ebx
call fcn.004ad9b8
mov esi, eax
xor eax, eax
pop ecx
mov dword [ebp - 0x1018], esi
cmp dword [ebx + 4], eax
jge 0x4a71ec
mov dword [ebx + 4], eax
push 1
push eax
push esi
call fcn.004ae6db
push eax
pop ecx
add esp, 0xc
mov dword [ebp - 0x1008], ecx
test ecx, ecx
jns 0x4a720c
or eax, 0xffffffff
jmp 0x4a74e0
mov edx, esi
sar edx, 5
mov dword [ebp - 0x1010], edx
mov edx, dword [edx*4 + 0x5bfdc8]
push esi
pop eax
and eax, 0x1f
shl eax, 6
mov dword [ebp - 0x101c], eax
mov dl, byte [eax + edx + 0x24]
add dl, dl
sar dl, 1
test dword [ebx + 0xc], 0x108
mov byte [ebp - 0x1009], dl
jne 0x4a724d
sub ecx, dword [ebx + 4]
push ecx
pop eax
jmp 0x4a74e0
mov esi, dword [ebx]
push edi
mov edi, esi
sub edi, dword [ebx + 8]
test byte [ebx + 0xc], 3
mov dword [ebp - 0x1014], edi
je 0x4a73df
cmp dl, 1
jne 0x4a738a
mov edi, dword [ebp - 0x1010]
mov ecx, dword [edi*4 + 0x5bfdc8]
mov edi, dword [ebp - 0x1014]
cmp dword [eax + ecx + 0x30], 0
mov ecx, dword [ebp - 0x1008]
je 0x4a738a
shr edi, 1
cmp dword [ebx + 4], 0
jne 0x4a72a1
push ecx
pop eax
jmp 0x4a74df
mov edx, dword [ebp - 0x1010]
mov ebx, dword [ebp - 0x1018]
mov ecx, dword [edx*4 + 0x5bfdc8]
push 0
push dword [eax + ecx + 0x2c]
push dword [eax + ecx + 0x28]
push ebx
call fcn.004ae82f
mov ecx, dword [ebp - 0x101c]
push eax
pop esi
mov eax, dword [ebp - 0x1010]
add esp, 0x10
mov eax, dword [eax*4 + 0x5bfdc8]
cmp esi, dword [ecx + eax + 0x28]
jne 0x4a7483
cmp edx, dword [ecx + eax + 0x2c]
jne 0x4a7483
push 0
lea edx, [ebp - 0x1014]
push edx
push 0x1000
lea edx, [ebp - 0x1004]
push edx
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a7483
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.004ae6db
add esp, 0xc
or eax, eax
js 0x4a7483
mov eax, dword [ebp - 0x1014]
cmp edi, eax
ja 0x4a7483
lea ecx, [ebp - 0x1004]
test edi, edi
je 0x4a737a
push ecx
pop edx
add edx, eax
dec edi
cmp ecx, edx
jae 0x4a737a
mov al, byte [ecx]
cmp al, 0xd
jne 0x4a7369
lea eax, [edx - 1]
cmp ecx, eax
jae 0x4a7375
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x4a7375
push eax
pop ecx
jmp 0x4a7375
movzx eax, al
movsx eax, byte [eax + 0x5bf3e0]
add ecx, eax
inc ecx
test edi, edi
jne 0x4a734b
lea eax, [ebp - 0x1004]
sub esi, eax
lea eax, [ecx + esi]
jmp 0x4a74df
mov edi, dword [ebp - 0x1010]
mov ecx, dword [edi*4 + 0x5bfdc8]
mov edi, dword [ebp - 0x1014]
test byte [eax + ecx + 4], 0x80
mov ecx, dword [ebp - 0x1008]
je 0x4a73d4
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x1014], ecx
cmp ecx, esi
mov ecx, dword [ebp - 0x1008]
jae 0x4a73d4
mov eax, dword [ebp - 0x1014]
cmp byte [eax], 0xa
jne 0x4a73c9
inc edi
inc eax
cmp eax, esi
jb 0x4a73c3
mov eax, dword [ebp - 0x101c]
test ecx, ecx
jne 0x4a73f5
mov eax, edi
jmp 0x4a74df
test byte [ebx + 0xc], 0x80
jne 0x4a73d4
call fcn.004a93f4
mov dword [eax], 0x16
jmp 0x4a7483
test byte [ebx + 0xc], 1
je 0x4a74d5
cmp dword [ebx + 4], 0
jne 0x4a740c
xor edi, edi
jmp 0x4a74d5
sub esi, dword [ebx + 8]
add esi, dword [ebx + 4]
mov ebx, dword [ebp - 0x1010]
mov ecx, dword [ebx*4 + 0x5bfdc8]
mov ebx, dword [ebp - 0x1020]
test byte [eax + ecx + 4], 0x80
mov ecx, dword [ebp - 0x1008]
je 0x4a74d3
push 2
push 0
push dword [ebp - 0x1018]
call fcn.004ae6db
mov ecx, dword [ebp - 0x1008]
add esp, 0xc
cmp eax, ecx
jne 0x4a746e
mov eax, dword [ebx + 8]
lea edx, [eax + esi]
jmp 0x4a7461
cmp byte [eax], 0xa
jne 0x4a7460
inc esi
inc eax
cmp eax, edx
jb 0x4a745a
test dword [ebx + 0xc], 0x2000
jmp 0x4a74c3
push 0
push ecx
push dword [ebp - 0x1018]
call fcn.004ae6db
add esp, 0xc
test eax, eax
jns 0x4a7488
or eax, 0xffffffff
jmp 0x4a74df
mov eax, 0x200
cmp esi, eax
ja 0x4a74a2
test byte [ebx + 0xc], 8
je 0x4a74a2
test dword [ebx + 0xc], 0x400
mov esi, eax
je 0x4a74a5
mov esi, dword [ebx + 0x18]
mov eax, dword [ebp - 0x1010]
mov ecx, dword [ebp - 0x101c]
mov eax, dword [eax*4 + 0x5bfdc8]
test byte [ecx + eax + 4], 4
mov ecx, dword [ebp - 0x1008]
je 0x4a74c6
inc esi
mov dl, byte [ebp - 0x1009]
cmp dl, 1
jne 0x4a74d3
shr esi, 1
sub ecx, esi
cmp dl, 1
jne 0x4a74dc
shr edi, 1
lea eax, [edi + ecx]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004a4894
leave
ret