Function at 0x4ae869
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edx
cmp esi, eax
jne 0x4ae89e
call fcn.004a9408
and dword [eax], 0
call fcn.004a93f5
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x4aee26
push ebx
xor ebx, ebx
cmp esi, ebx
jl 0x4ae8ad
cmp esi, dword [0x51f070]
jb 0x4ae8d4
call fcn.004a9408
mov dword [eax], ebx
call fcn.004a93f5
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 9
call fcn.004a9396
add esp, 0x14
or eax, 0xffffffff
jmp 0x4aee25
mov eax, esi
sar eax, 5
push edi
lea edi, [eax*4 + 0x51f080]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 6
add eax, esi
mov cl, byte [eax + 4]
test cl, 1
jne 0x4ae907
call fcn.004a9408
mov dword [eax], ebx
call fcn.004a93f5
mov dword [eax], 9
jmp 0x4ae971
cmp edx, 0x7fffffff
ja 0x4ae95f
mov dword [ebp - 0x10], ebx
cmp edx, ebx
je 0x4aee22
test cl, 2
jne 0x4aee22
cmp dword [ebp + 0xc], ebx
je 0x4ae95f
mov al, byte [eax + 0x24]
add al, al
sar al, 1
mov byte [ebp - 2], al
movsx eax, al
dec eax
push 4
pop ecx
je 0x4ae957
dec eax
jne 0x4ae94c
mov eax, edx
not eax
test al, 1
je 0x4ae95f
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x4ae9d8
mov eax, edx
not eax
test al, 1
jne 0x4ae980
call fcn.004a9408
mov dword [eax], ebx
call fcn.004a93f5
mov dword [eax], 0x16
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004a9396
add esp, 0x14
jmp 0x4ae9b4
mov eax, edx
shr eax, 1
mov dword [ebp + 0x10], ecx
cmp eax, ecx
jb 0x4ae98e
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call fcn.004ad5fa
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
jne 0x4ae9bc
call fcn.004a93f5
mov dword [eax], 0xc
call fcn.004a9408
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x4aee24
push 1
push ebx
push ebx
push dword [ebp + 8]
call fcn.004b14b6
mov ecx, dword [edi]
mov dword [esi + ecx + 0x28], eax
mov eax, dword [ebp - 0xc]
add esp, 0x10
mov dword [esi + ecx + 0x2c], edx
mov ecx, dword [edi]
add ecx, esi
test byte [ecx + 4], 0x48
je 0x4aea56
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x4aea56
cmp dword [ebp + 0x10], ebx
je 0x4aea56
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0x10], 1
mov byte [esi + ecx + 5], 0xa
cmp byte [ebp - 2], bl
je 0x4aea56
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x25]
cmp cl, 0xa
je 0x4aea56
cmp dword [ebp + 0x10], ebx
je 0x4aea56
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0x10], 2
mov byte [esi + ecx + 0x25], 0xa
jne 0x4aea56
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x26]
cmp cl, 0xa
je 0x4aea56
cmp dword [ebp + 0x10], ebx
je 0x4aea56
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0x10], 3
mov byte [esi + ecx + 0x26], 0xa
push ebx
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4aeded
mov ecx, dword [ebp - 0x18]
cmp ecx, ebx
jl 0x4aeded
cmp ecx, dword [ebp + 0x10]
ja 0x4aeded
mov eax, dword [edi]
add dword [ebp - 0x10], ecx
lea eax, [esi + eax + 4]
test byte [eax], 0x80
je 0x4aec7e
cmp byte [ebp - 2], 2
je 0x4aecb8
cmp ecx, ebx
je 0x4aeab3
mov ecx, dword [ebp - 0xc]
cmp byte [ecx], 0xa
jne 0x4aeab3
or byte [eax], 4
jmp 0x4aeab6
and byte [eax], 0xfb
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add eax, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x10], eax
cmp ebx, eax
jae 0x4aeb9c
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x4aeb87
cmp al, 0xd
je 0x4aeae9
mov byte [ebx], al
inc ebx
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x4aeb79
mov eax, dword [ebp - 0x10]
dec eax
cmp ecx, eax
jae 0x4aeb08
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x4aeb03
inc ecx
inc ecx
mov dword [ebp + 0x10], ecx
mov byte [ebx], 0xa
jmp 0x4aeb78
mov dword [ebp + 0x10], eax
jmp 0x4aeb75
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4aeb30
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4aeb75
cmp dword [ebp - 0x18], 0
je 0x4aeb75
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x4aeb53
cmp byte [ebp - 1], 0xa
je 0x4aeafe
mov byte [ebx], 0xd
mov eax, dword [edi]
mov cl, byte [ebp - 1]
mov byte [esi + eax + 5], cl
jmp 0x4aeb78
cmp ebx, dword [ebp - 0xc]
jne 0x4aeb5e
cmp byte [ebp - 1], 0xa
je 0x4aeafe
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004b14b6
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4aeb79
mov byte [ebx], 0xd
inc ebx
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0x10], eax
jb 0x4aeacc
jmp 0x4aeb9c
mov eax, dword [edi]
lea eax, [esi + eax + 4]
test byte [eax], 0x40
jne 0x4aeb97
or byte [eax], 2
jmp 0x4aeb9c
mov al, byte [ecx]
mov byte [ebx], al
inc ebx
mov eax, ebx
sub eax, dword [ebp - 0xc]
cmp byte [ebp - 2], 1
mov dword [ebp - 0x10], eax
jne 0x4aec7e
test eax, eax
je 0x4aec7e
dec ebx
mov cl, byte [ebx]
test cl, cl
js 0x4aebc3
inc ebx
jmp 0x4aec49
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x4aebda
cmp eax, 4
jg 0x4aebe3
cmp ebx, dword [ebp - 0xc]
jb 0x4aebe3
dec ebx
movzx ecx, byte [ebx]
inc eax
cmp byte [ecx + 0x4cd068], 0
je 0x4aebcb
mov dl, byte [ebx]
movzx ecx, dl
movsx ecx, byte [ecx + 0x4cd068]
test ecx, ecx
jne 0x4aec00
call fcn.004a93f5
mov dword [eax], 0x2a
jmp 0x4aec7a
inc ecx
cmp ecx, eax
jne 0x4aec09
add ebx, eax
jmp 0x4aec49
mov ecx, dword [edi]
add ecx, esi
test byte [ecx + 4], 0x48
je 0x4aec37
inc ebx
cmp eax, 2
mov byte [ecx + 5], dl
jl 0x4aec25
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x25], dl
inc ebx
cmp eax, 3
jne 0x4aec33
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x26], dl
inc ebx
sub ebx, eax
jmp 0x4aec49
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.004b14b6
add esp, 0x10
mov eax, dword [ebp - 0x1c]
sub ebx, dword [ebp - 0xc]
shr eax, 1
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0xc]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x4aeca1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a941b
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x4aec8d
push eax
call fcn.004a4d4f
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x4aee24
mov eax, dword [ebp - 0x10]
jmp 0x4aee24
mov eax, dword [ebp - 0x10]
mov edx, dword [edi]
xor ecx, ecx
cmp eax, ebx
setne cl
add eax, eax
mov dword [ebp - 0x10], eax
mov dword [esi + edx + 0x30], ecx
jmp 0x4aec7e
cmp ecx, ebx
je 0x4aecca
mov ecx, dword [ebp - 0xc]
cmp word [ecx], 0xa
jne 0x4aecca
or byte [eax], 4
jmp 0x4aeccd
and byte [eax], 0xfb
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add eax, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x10], eax
cmp ebx, eax
jae 0x4aede2
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp cx, 0x1a
je 0x4aedca
cmp cx, 0xd
je 0x4aed08
mov word [ebx], cx
inc ebx
inc ebx
inc eax
inc eax
mov dword [ebp + 0x10], eax
jmp 0x4aedbc
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x4aed30
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x4aed28
add eax, 4
mov dword [ebp + 0x10], eax
push 0xa
jmp 0x4aedb6
mov dword [ebp + 0x10], ecx
jmp 0x4aedb4
add dword [ebp + 0x10], 2
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4aed59
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4aedb4
cmp dword [ebp - 0x18], 0
je 0x4aedb4
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x4aed90
cmp word [ebp - 8], 0xa
je 0x4aed21
push 0xd
pop eax
mov word [ebx], ax
mov eax, dword [edi]
mov cl, byte [ebp - 8]
mov byte [esi + eax + 5], cl
mov eax, dword [edi]
mov cl, byte [ebp - 7]
mov byte [esi + eax + 0x25], cl
mov eax, dword [edi]
mov byte [esi + eax + 0x26], 0xa
jmp 0x4aedba
cmp ebx, dword [ebp - 0xc]
jne 0x4aed9c
cmp word [ebp - 8], 0xa
je 0x4aed21
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004b14b6
add esp, 0x10
cmp word [ebp - 8], 0xa
je 0x4aedbc
push 0xd
pop eax
mov word [ebx], ax
inc ebx
inc ebx
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0x10], eax
jb 0x4aece3
jmp 0x4aede2
mov ecx, dword [edi]
lea esi, [esi + ecx + 4]
test byte [esi], 0x40
jne 0x4aedda
or byte [esi], 2
jmp 0x4aede2
mov ax, word [eax]
mov word [ebx], ax
inc ebx
inc ebx
sub ebx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ebx
jmp 0x4aec7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4aee11
call fcn.004a93f5
mov dword [eax], 9
call fcn.004a9408
mov dword [eax], esi
jmp 0x4aec7a
cmp eax, 0x6d
jne 0x4aec73
mov dword [ebp - 0x14], ebx
jmp 0x4aec7e
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret