Function at 0x4bf7f6
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1020
call fcn.004c0c40
mov eax, dword [0x518450]
xor eax, esp
mov dword [esp + 0x101c], eax
push ebp
mov ebp, dword [esp + 0x1028]
mov dword [esp + 0x18], ebp
test ebp, ebp
jne 0x4bf836
call fcn.004c302f
mov dword [eax], 0x16
call fcn.004c467e
or eax, 0xffffffff
jmp 0x4bfb04
push ebx
push esi
push ebp
call fcn.004bf4a4
xor ebx, ebx
mov esi, eax
pop ecx
mov dword [esp + 0x1c], esi
cmp dword [ebp + 4], ebx
jge 0x4bf84f
mov dword [ebp + 4], ebx
push 1
push ebx
push esi
call fcn.004cb14b
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x14], ecx
test ecx, ecx
jns 0x4bf86d
or eax, 0xffffffff
jmp 0x4bfb02
mov edx, esi
mov eax, esi
sar edx, 5
and eax, 0x1f
mov dword [esp + 0x10], edx
shl eax, 6
mov dword [esp + 0x24], eax
mov edx, dword [edx*4 + 0x52a778]
mov dl, byte [eax + edx + 0x24]
add dl, dl
sar dl, 1
test dword [ebp + 0xc], 0x108
mov byte [esp + 0xf], dl
jne 0x4bf8a8
sub ecx, dword [ebp + 4]
mov eax, ecx
jmp 0x4bfb02
mov esi, dword [ebp]
push edi
mov edi, esi
sub edi, dword [ebp + 8]
test byte [ebp + 0xc], 3
mov dword [esp + 0x1c], edi
je 0x4bf9fe
cmp dl, 1
jne 0x4bf9c5
mov edi, dword [esp + 0x14]
mov ecx, dword [edi*4 + 0x52a778]
mov edi, dword [esp + 0x1c]
cmp dword [eax + ecx + 0x30], ebx
mov ecx, dword [esp + 0x18]
je 0x4bf9c5
shr edi, 1
cmp dword [ebp + 4], ebx
jne 0x4bf8f3
mov eax, ecx
jmp 0x4bfb01
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
push ebx
mov ecx, dword [edx*4 + 0x52a778]
push dword [eax + ecx + 0x2c]
push dword [eax + ecx + 0x28]
push ebp
call fcn.004cb2fa
mov ecx, dword [esp + 0x38]
mov esi, eax
mov eax, dword [esp + 0x24]
add esp, 0x10
mov eax, dword [eax*4 + 0x52a778]
cmp esi, dword [ecx + eax + 0x28]
jne 0x4bfaad
cmp edx, dword [ecx + eax + 0x2c]
jne 0x4bfaad
push ebx
lea edx, [esp + 0x20]
push edx
push 0x1000
lea edx, [esp + 0x38]
push edx
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bfaad
push ebx
push dword [esp + 0x1c]
push ebp
call fcn.004cb14b
add esp, 0xc
test eax, eax
js 0x4bfaad
mov eax, dword [esp + 0x1c]
cmp edi, eax
ja 0x4bfaad
lea ecx, [esp + 0x2c]
test edi, edi
je 0x4bf9b7
mov edx, ecx
add edx, eax
dec edi
cmp ecx, edx
jae 0x4bf9b7
mov al, byte [ecx]
cmp al, 0xd
jne 0x4bf9a6
lea eax, [edx - 1]
cmp ecx, eax
jae 0x4bf9b2
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x4bf9b2
mov ecx, eax
jmp 0x4bf9b2
movzx eax, al
movsx eax, byte [eax + 0x518bf0]
add ecx, eax
inc ecx
test edi, edi
jne 0x4bf988
lea eax, [esp + 0x2c]
sub esi, eax
lea eax, [ecx + esi]
jmp 0x4bfb01
mov edi, dword [esp + 0x14]
mov ecx, dword [edi*4 + 0x52a778]
mov edi, dword [esp + 0x1c]
test byte [eax + ecx + 4], 0x80
mov ecx, dword [esp + 0x18]
je 0x4bf9f3
mov edx, dword [ebp + 8]
jmp 0x4bf9eb
cmp byte [edx], 0xa
jne 0x4bf9ea
inc edi
inc edx
cmp edx, esi
jb 0x4bf9e4
mov dl, byte [esp + 0x13]
test ecx, ecx
jne 0x4bfa14
mov eax, edi
jmp 0x4bfb01
test byte [ebp + 0xc], 0x80
jne 0x4bf9f3
call fcn.004c302f
mov dword [eax], 0x16
jmp 0x4bfaad
test byte [ebp + 0xc], 1
je 0x4bfaf7
cmp dword [ebp + 4], ebx
jne 0x4bfa2a
mov edi, ebx
jmp 0x4bfaf7
sub esi, dword [ebp + 8]
add esi, dword [ebp + 4]
mov ebp, dword [esp + 0x14]
mov ecx, dword [ebp*4 + 0x52a778]
mov ebp, dword [esp + 0x24]
test byte [eax + ecx + 4], 0x80
mov ecx, dword [esp + 0x18]
je 0x4bfaf5
push 2
push ebx
push dword [esp + 0x28]
call fcn.004cb14b
mov ecx, dword [esp + 0x24]
add esp, 0xc
cmp eax, ecx
jne 0x4bfa9b
mov edx, dword [ebp + 8]
and dword [esp + 0x24], ebx
lea eax, [edx + esi]
mov dword [esp + 0x14], eax
sub dword [esp + 0x14], edx
cmp edx, eax
mov eax, dword [esp + 0x14]
cmova eax, dword [esp + 0x24]
test eax, eax
je 0x4bfa92
cmp byte [edx], 0xa
jne 0x4bfa8c
inc esi
inc edx
inc ebx
cmp ebx, eax
jb 0x4bfa86
test dword [ebp + 0xc], 0x2000
jmp 0x4bfae7
push ebx
push ecx
push dword [esp + 0x28]
call fcn.004cb14b
add esp, 0xc
test eax, eax
jns 0x4bfab2
or eax, 0xffffffff
jmp 0x4bfb01
mov eax, 0x200
cmp esi, eax
ja 0x4bfacc
test byte [ebp + 0xc], 8
je 0x4bfacc
test dword [ebp + 0xc], 0x400
mov esi, eax
je 0x4bfacf
mov esi, dword [ebp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x52a778]
test byte [ecx + eax + 4], 4
mov ecx, dword [esp + 0x18]
je 0x4bfaea
inc esi
mov dl, byte [esp + 0x13]
cmp dl, 1
jne 0x4bfaf5
shr esi, 1
sub ecx, esi
cmp dl, 1
jne 0x4bfafe
shr edi, 1
lea eax, [edi + ecx]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1020]
pop ebp
xor ecx, esp
call fcn.004b9a6c
add esp, 0x1020
ret