Function at 0x4bf246
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1020
call fcn.004c0690
mov eax, dword [0x517490]
xor eax, esp
mov dword [esp + 0x101c], eax
push ebp
mov ebp, dword [esp + 0x1028]
mov dword [esp + 0x18], ebp
test ebp, ebp
jne 0x4bf286
call fcn.004c2a7f
mov dword [eax], 0x16
call fcn.004c40ce
or eax, 0xffffffff
jmp 0x4bf554
push ebx
push esi
push ebp
call fcn.004beef4
xor ebx, ebx
mov esi, eax
pop ecx
mov dword [esp + 0x1c], esi
cmp dword [ebp + 4], ebx
jge 0x4bf29f
mov dword [ebp + 4], ebx
push 1
push ebx
push esi
call fcn.004cabaa
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x14], ecx
test ecx, ecx
jns 0x4bf2bd
or eax, 0xffffffff
jmp 0x4bf552
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 + 0x5297b8]
mov dl, byte [eax + edx + 0x24]
add dl, dl
sar dl, 1
test dword [ebp + 0xc], 0x108
mov byte [esp + 0xf], dl
jne 0x4bf2f8
sub ecx, dword [ebp + 4]
mov eax, ecx
jmp 0x4bf552
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 0x4bf44e
cmp dl, 1
jne 0x4bf415
mov edi, dword [esp + 0x14]
mov ecx, dword [edi*4 + 0x5297b8]
mov edi, dword [esp + 0x1c]
cmp dword [eax + ecx + 0x30], ebx
mov ecx, dword [esp + 0x18]
je 0x4bf415
shr edi, 1
cmp dword [ebp + 4], ebx
jne 0x4bf343
mov eax, ecx
jmp 0x4bf551
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
push ebx
mov ecx, dword [edx*4 + 0x5297b8]
push dword [eax + ecx + 0x2c]
push dword [eax + ecx + 0x28]
push ebp
call fcn.004cad59
mov ecx, dword [esp + 0x38]
mov esi, eax
mov eax, dword [esp + 0x24]
add esp, 0x10
mov eax, dword [eax*4 + 0x5297b8]
cmp esi, dword [ecx + eax + 0x28]
jne 0x4bf4fd
cmp edx, dword [ecx + eax + 0x2c]
jne 0x4bf4fd
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 0x4bf4fd
push ebx
push dword [esp + 0x1c]
push ebp
call fcn.004cabaa
add esp, 0xc
test eax, eax
js 0x4bf4fd
mov eax, dword [esp + 0x1c]
cmp edi, eax
ja 0x4bf4fd
lea ecx, [esp + 0x2c]
test edi, edi
je 0x4bf407
mov edx, ecx
add edx, eax
dec edi
cmp ecx, edx
jae 0x4bf407
mov al, byte [ecx]
cmp al, 0xd
jne 0x4bf3f6
lea eax, [edx - 1]
cmp ecx, eax
jae 0x4bf402
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x4bf402
mov ecx, eax
jmp 0x4bf402
movzx eax, al
movsx eax, byte [eax + 0x517c30]
add ecx, eax
inc ecx
test edi, edi
jne 0x4bf3d8
lea eax, [esp + 0x2c]
sub esi, eax
lea eax, [ecx + esi]
jmp 0x4bf551
mov edi, dword [esp + 0x14]
mov ecx, dword [edi*4 + 0x5297b8]
mov edi, dword [esp + 0x1c]
test byte [eax + ecx + 4], 0x80
mov ecx, dword [esp + 0x18]
je 0x4bf443
mov edx, dword [ebp + 8]
jmp 0x4bf43b
cmp byte [edx], 0xa
jne 0x4bf43a
inc edi
inc edx
cmp edx, esi
jb 0x4bf434
mov dl, byte [esp + 0x13]
test ecx, ecx
jne 0x4bf464
mov eax, edi
jmp 0x4bf551
test byte [ebp + 0xc], 0x80
jne 0x4bf443
call fcn.004c2a7f
mov dword [eax], 0x16
jmp 0x4bf4fd
test byte [ebp + 0xc], 1
je 0x4bf547
cmp dword [ebp + 4], ebx
jne 0x4bf47a
mov edi, ebx
jmp 0x4bf547
sub esi, dword [ebp + 8]
add esi, dword [ebp + 4]
mov ebp, dword [esp + 0x14]
mov ecx, dword [ebp*4 + 0x5297b8]
mov ebp, dword [esp + 0x24]
test byte [eax + ecx + 4], 0x80
mov ecx, dword [esp + 0x18]
je 0x4bf545
push 2
push ebx
push dword [esp + 0x28]
call fcn.004cabaa
mov ecx, dword [esp + 0x24]
add esp, 0xc
cmp eax, ecx
jne 0x4bf4eb
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 0x4bf4e2
cmp byte [edx], 0xa
jne 0x4bf4dc
inc esi
inc edx
inc ebx
cmp ebx, eax
jb 0x4bf4d6
test dword [ebp + 0xc], 0x2000
jmp 0x4bf537
push ebx
push ecx
push dword [esp + 0x28]
call fcn.004cabaa
add esp, 0xc
test eax, eax
jns 0x4bf502
or eax, 0xffffffff
jmp 0x4bf551
mov eax, 0x200
cmp esi, eax
ja 0x4bf51c
test byte [ebp + 0xc], 8
je 0x4bf51c
test dword [ebp + 0xc], 0x400
mov esi, eax
je 0x4bf51f
mov esi, dword [ebp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x5297b8]
test byte [ecx + eax + 4], 4
mov ecx, dword [esp + 0x18]
je 0x4bf53a
inc esi
mov dl, byte [esp + 0x13]
cmp dl, 1
jne 0x4bf545
shr esi, 1
sub ecx, esi
cmp dl, 1
jne 0x4bf54e
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.004b94b6
add esp, 0x1020
ret