Function at 0x4ae620
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e4039
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x66a074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xa0], edi
lea ecx, [ebp - 0xa4]
call fcn.004cc080
mov dword [ebp - 4], 2
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
mov byte [ebp - 4], 4
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0xf
mov byte [ebp - 0x94], 0
mov byte [ebp - 4], 6
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0xf
mov byte [ebp - 0x7c], 0
mov byte [ebp - 4], 7
lea eax, [ebp - 0x64]
push 0
push 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
call fcn.004af820
mov dword [ebp - 0x64], eax
push 0x80
push 3
push 1
push SysReAllocString
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa4]
xor bl, bl
mov dword [ebp - 0xb0], 0
push edi
mov dword [ebp - 0x98], ebx
call fcn.004cc130
mov esi, dword [ebp - 0xa4]
test al, al
je 0x4ae982
test esi, esi
je 0x4ae9c0
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4ae982
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4ae76e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4ae97c
mov eax, dword [ebp - 0x14]
xor ebx, ebx
add ebx, edi
adc eax, 0
mov dword [ebp - 0x9c], eax
jne 0x4ae789
cmp ebx, 0x1e
jb 0x4ae976
push ebx
call fcn.005b79a5
mov edi, eax
add esp, 4
mov dword [ebp - 0xac], edi
test edi, edi
je 0x4ae976
cmp dword [esi], 0xffffffff
je 0x4ae960
push 0
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa8], 0
push eax
push ebx
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ae960
cmp ebx, dword [ebp - 0xa8]
jne 0x4ae960
cmp dword [ebp - 0x9c], 0
jne 0x4ae960
mov eax, dword [ebp - 0xac]
dec edi
add edi, ebx
cmp byte [eax], 0
jne 0x4ae960
cmp byte [eax + 1], 0xbf
jne 0x4ae960
add eax, 2
mov dword [ebp - 0x9c], eax
movzx edx, byte [eax]
lea ecx, [eax + 1]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x9c], ecx
movzx eax, byte [ecx]
inc ecx
shl edx, 8
or edx, eax
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0x34], edx
movzx eax, byte [ecx]
inc ecx
shl edx, 8
or edx, eax
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0x34], edx
movzx eax, byte [ecx]
inc ecx
shl edx, 8
or edx, eax
mov dword [ebp - 0x9c], ecx
lea eax, [ebx - 6]
mov dword [ebp - 0x34], edx
cmp edx, eax
jne 0x4ae960
cmp byte [ecx], 0x54
jne 0x4ae960
cmp byte [ecx + 1], 0x43
jne 0x4ae960
cmp byte [ecx + 2], 0x53
jne 0x4ae960
cmp byte [ecx + 3], 0x4f
jne 0x4ae960
cmp byte [ecx + 4], 0
jne 0x4ae960
cmp byte [ecx + 5], 4
jne 0x4ae960
cmp byte [ecx + 6], 0
jne 0x4ae960
cmp byte [ecx + 7], 0
jne 0x4ae960
cmp byte [ecx + 8], 0
jne 0x4ae960
cmp byte [ecx + 9], 0
jne 0x4ae960
add ecx, 0xa
lea edx, [ebp - 0x30]
mov dword [ebp - 0x9c], ecx
lea ecx, [ebp - 0x9c]
call fcn.004af160
test al, al
je 0x4ae960
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x9c]
call fcn.004af230
cmp dword [ebp - 0x18], 0
jne 0x4ae960
cmp dword [ebp - 0x9c], edi
jae 0x4ae927
nop dword [eax]
lea eax, [ebp - 0x94]
push eax
push 1
push 1
lea eax, [ebp - 0x9c]
push edi
push eax
call fcn.004aedc0
add esp, 0x14
test al, al
je 0x4ae960
cmp dword [ebp - 0x9c], edi
jb 0x4ae900
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x94]
push eax
call fcn.004ae570
mov ebx, dword [ebp - 0x98]
add esp, 8
test al, al
movzx ebx, bl
mov ecx, 1
cmovne ebx, ecx
push dword [ebp - 0xac]
call fcn.005b79a0
add esp, 4
jmp 0x4ae97c
push dword [ebp - 0xac]
mov ebx, dword [ebp - 0x98]
call fcn.005b79a0
add esp, 4
jmp 0x4ae97c
mov ebx, dword [ebp - 0x98]
mov edi, dword [ebp - 0xa0]
test esi, esi
je 0x4ae99e
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4ae99e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4ae99e
mov dword [esi], 0xffffffff
test bl, bl
je 0x4ae9c0
mov eax, dword [ebp - 0xb0]
mov edx, edi
add dword [ebp - 0x34], eax
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.004aec10
add esp, 8
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 3
call fcn.004aeb30
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x4aea03
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4ae9f9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4aea43
push edx
push ecx
call fcn.005b7992
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
lea ecx, [ebp - 0xa4]
mov dword [ebp - 4], 0xffffffff
call fcn.004cc0f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b75ab
mov esp, ebp
pop ebp
ret
call fcn.005c00b0
int3