Function at 0x4f2070
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1060
call fcn.004df6e0
mov eax, dword [0x5c5c30]
xor eax, ebp
mov dword [ebp - 0x30], eax
push esi
cmp dword [ebp + 8], 0
jne 0x4f20ac
push str.str___NULL
push 0
push 0x5d
push str.ftelli64.c
push 2
call fcn.004d4350
add esp, 0x14
cmp eax, 1
jne 0x4f20ac
int3
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004e0310
add esp, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 0
jge 0x4f20d4
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], 0
push 1
push 0
push 0
mov edx, dword [ebp - 0x18]
push edx
call fcn.004ecaa0
add esp, 0x10
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
jg 0x4f2105
jl 0x4f20fa
cmp dword [ebp - 0x28], 0
jae 0x4f2105
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
mov eax, dword [ebp - 0x18]
sar eax, 5
mov ecx, dword [ebp - 0x18]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x5cc200]
mov al, byte [edx + ecx + 0x24]
shl al, 1
sar al, 1
mov byte [ebp - 9], al
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
and edx, 0x108
jne 0x4f214e
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
cdq
mov ecx, dword [ebp - 0x28]
sub ecx, eax
mov esi, dword [ebp - 0x24]
sbb esi, edx
mov eax, ecx
mov edx, esi
jmp 0x4f25f1
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [edx]
sub ecx, dword [eax + 8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
and eax, 3
je 0x4f23ec
movsx ecx, byte [ebp - 9]
cmp ecx, 1
jne 0x4f2393
mov edx, dword [ebp - 0x18]
sar edx, 5
mov eax, dword [ebp - 0x18]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x5cc200]
cmp dword [ecx + eax + 0x30], 0
je 0x4f2393
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [edx]
sub ecx, dword [eax + 8]
shr ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x4f21c2
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
jmp 0x4f25f1
push 0
mov eax, dword [ebp - 0x18]
sar eax, 5
mov ecx, dword [ebp - 0x18]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x5cc200]
mov eax, dword [edx + ecx + 0x2c]
push eax
mov ecx, dword [edx + ecx + 0x28]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.004ecaa0
add esp, 0x10
mov dword [ebp - 0x1040], eax
mov dword [ebp - 0x103c], edx
mov eax, dword [ebp - 0x18]
sar eax, 5
mov ecx, dword [ebp - 0x18]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x5cc200]
mov dword [ebp - 0x1044], edx
mov dword [ebp - 0x1048], ecx
mov eax, dword [ebp - 0x1048]
mov ecx, dword [ebp - 0x1044]
mov edx, dword [ebp - 0x1040]
cmp edx, dword [ecx + eax + 0x28]
jne 0x4f224e
mov eax, dword [ebp - 0x1048]
mov ecx, dword [ebp - 0x1044]
mov edx, dword [ebp - 0x103c]
cmp edx, dword [ecx + eax + 0x2c]
je 0x4f2259
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
push 0
lea eax, [ebp - 0x1034]
push eax
push 0x1000
lea ecx, [ebp - 0x1030]
push ecx
mov edx, dword [ebp - 0x18]
sar edx, 5
mov eax, dword [ebp - 0x18]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x5cc200]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4f229d
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
push 0
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.004ecaa0
add esp, 0x10
mov dword [ebp - 0x1050], eax
mov dword [ebp - 0x104c], edx
cmp dword [ebp - 0x104c], 0
jg 0x4f22de
jl 0x4f22d3
cmp dword [ebp - 0x1050], 0
jae 0x4f22de
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x1034]
jbe 0x4f22f4
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
lea ecx, [ebp - 0x1030]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
sub eax, 1
mov dword [ebp - 0x2c], eax
test edx, edx
je 0x4f2371
mov ecx, dword [ebp - 0x1034]
lea edx, [ebp + ecx - 0x1030]
cmp dword [ebp - 4], edx
jae 0x4f2371
mov eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0xd
jne 0x4f2353
mov edx, dword [ebp - 0x1034]
lea eax, [ebp + edx - 0x1031]
cmp dword [ebp - 4], eax
jae 0x4f2351
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx + 1]
cmp edx, 0xa
jne 0x4f2351
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x4f2366
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx]
movsx eax, byte [edx + 0x5c5ac8]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
jmp 0x4f22fd
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x1030]
sub edx, eax
mov eax, edx
xor ecx, ecx
add eax, dword [ebp - 0x1040]
mov edx, dword [ebp - 0x103c]
adc edx, ecx
jmp 0x4f25f1
mov edx, dword [ebp - 0x18]
sar edx, 5
mov eax, dword [ebp - 0x18]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x5cc200]
movsx edx, byte [ecx + eax + 4]
and edx, 0x80
je 0x4f23ea
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 8]
mov dword [ebp - 4], ecx
jmp 0x4f23ca
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax]
jae 0x4f23ea
mov edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0xa
jne 0x4f23e8
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x4f23c1
jmp 0x4f240f
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
and eax, 0x80
jne 0x4f240f
call fcn.004dc110
mov dword [eax], 0x16
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
mov ecx, dword [ebp - 0x28]
or ecx, dword [ebp - 0x24]
jne 0x4f2421
mov eax, dword [ebp - 0x10]
xor edx, edx
jmp 0x4f25f1
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
and eax, 1
je 0x4f25d1
mov ecx, dword [ebp - 8]
cmp dword [ecx + 4], 0
jne 0x4f2445
mov dword [ebp - 0x10], 0
jmp 0x4f25d1
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [edx]
sub ecx, dword [eax + 8]
mov edx, dword [ebp - 8]
add ecx, dword [edx + 4]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x18]
sar eax, 5
mov ecx, dword [ebp - 0x18]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x5cc200]
movsx eax, byte [edx + ecx + 4]
and eax, 0x80
je 0x4f25ab
push 2
push 0
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.004ecaa0
add esp, 0x10
mov dword [ebp - 0x1058], eax
mov dword [ebp - 0x1054], edx
mov edx, dword [ebp - 0x1058]
cmp edx, dword [ebp - 0x28]
jne 0x4f250d
mov eax, dword [ebp - 0x1054]
cmp eax, dword [ebp - 0x24]
jne 0x4f250d
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 8]
mov dword [ebp - 4], ecx
jmp 0x4f24d3
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1c]
jae 0x4f24f1
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x4f24ef
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4f24ca
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
and edx, 0x2000
je 0x4f2508
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4f25ab
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.004ecaa0
add esp, 0x10
mov dword [ebp - 0x1060], eax
mov dword [ebp - 0x105c], edx
cmp dword [ebp - 0x105c], 0
jg 0x4f254e
jl 0x4f2543
cmp dword [ebp - 0x1060], 0
jae 0x4f254e
or eax, 0xffffffff
or edx, 0xffffffff
jmp 0x4f25f1
cmp dword [ebp - 0x14], 0x200
ja 0x4f2579
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
and edx, 8
je 0x4f2579
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
and ecx, 0x400
jne 0x4f2579
mov dword [ebp - 0x14], 0x200
jmp 0x4f2582
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
sar ecx, 5
mov edx, dword [ebp - 0x18]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x5cc200]
movsx ecx, byte [eax + edx + 4]
and ecx, 4
je 0x4f25ab
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
movsx eax, byte [ebp - 9]
cmp eax, 1
jne 0x4f25bc
mov ecx, dword [ebp - 0x14]
shr ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
xor eax, eax
mov ecx, dword [ebp - 0x28]
sub ecx, edx
mov edx, dword [ebp - 0x24]
sbb edx, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edx
movsx eax, byte [ebp - 9]
cmp eax, 1
jne 0x4f25e2
mov ecx, dword [ebp - 0x10]
shr ecx, 1
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
xor edx, edx
add eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
adc ecx, edx
mov edx, ecx
pop esi
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.004d1610
mov esp, ebp
pop ebp
ret