Function at 0x4ae760
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56126d
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x5d6024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
test ebx, ebx
js 0x4aee75
cmp ebx, dword [edi + 0x7c]
jge 0x4aee75
mov esi, dword [edi + 0x78]
mov ecx, ebx
shl ecx, 5
add esi, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x30], esi
cmp byte [esi + 0x1c], 0
je 0x4ae7ca
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 4]
add eax, 0xfffffffc
cmp eax, 6
ja case.0x4ae7dc.6
movzx eax, byte [eax + 0x4aeea0]
jmp dword [eax*4 + 0x4aee98]
mov ecx, dword [edi + 0x70]
cmp dword [ecx - 0xc], 0
jne 0x4ae7ef
mov ecx, dword [edi + 0x68]
add ecx, 0xfffffff0
call fcn.00408b20
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 1
cmp ebx, dword [edi + 0x7c]
jge 0x4aee75
mov eax, dword [edi + 0x78]
lea edx, [ebp - 0x1c]
add eax, 0x18
lea ecx, [ebp - 0x14]
add eax, dword [ebp - 0x18]
push eax
call fcn.00490af0
add esp, 4
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24]
mov eax, dword [esi + 0xc]
push dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
call fcn.00415360
mov byte [ebp - 4], 3
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x2c]
call fcn.004935e0
mov byte [ebp - 4], 4
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete byte [ebp - 0xd]
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4ae87d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4ae89b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x4ae910
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, eax
lea ecx, [ebp + 0xc]
lea ebx, [edi + 0xd4]
call fcn.004967d0
add esp, 4
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x14]
mov eax, dword [eax]
mov edi, dword [ebp - 0x14]
mov dword [ebp + 8], eax
call fcn.00492fa0
test al, al
je 0x4ae8d6
add edi, 8
push dword [ebp + 8]
push edi
push 0x104
push ebx
call fcn.0049cd80
add esp, 0x10
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4ae906
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 0xe
jmp 0x4aee18
mov ecx, dword [ebp - 0x1c]
push 0
push dword [ebp - 0x28]
call fcn.004bb360
add esp, 8
test al, al
jne 0x4aea11
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x4ae946
mov eax, dword [ecx]
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x1c]
call dword [eax]
test eax, eax
jne 0x4aea11
cmp byte [0x5dc4e4], 0
je 0x4aea07
call fcn.00409310
mov ecx, eax
test ecx, ecx
je 0x4aee81
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 8]
push 0x26
push str.Not_enough_disk_space_to_extract_file:
call fcn.00418fd0
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x1c]
add eax, 0x18
lea ecx, [ebp + 0xc]
push eax
call fcn.00490af0
add esp, 4
mov byte [ebp - 4], 0xc
mov edx, dword [eax]
test edx, edx
je 0x4ae9bd
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ae9a4
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 8]
call fcn.00418fd0
lea eax, [ebp + 8]
mov ecx, 0x5dc4ac
push eax
call fcn.004c5760
mov byte [ebp - 4], 0xb
mov eax, esi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4ae9e9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4aea07
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 0xa
jmp 0x4aee18
cmp ebx, dword [edi + 0x7c]
jge 0x4aee75
mov ecx, dword [ebp - 0x18]
add ecx, dword [edi + 0x78]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
test ebx, ebx
je 0x4aea7b
mov eax, dword [ebx]
push 0
push dword [ecx + 0xc]
mov ecx, ebx
call dword [eax + 0x1c]
mov eax, dword [ebx]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x7c]
jge 0x4aee75
mov eax, dword [edi + 0x78]
lea ecx, [ebp - 0x14]
add eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0xc], eax
call fcn.00492fa0
test al, al
mov eax, dword [ebp + 0xc]
je 0x4aea72
add eax, 8
push dword [ebp - 0x30]
mov ecx, ebx
push eax
call dword [ebp - 0x2c]
cmp dword [ebp - 0x28], 0xc
jne 0x4aea90
lea eax, [ebp - 0x14]
lea ecx, [edi + 0xa4]
push eax
call fcn.0048f8e0
lea eax, [edi + 0xb0]
xor dl, dl
push eax
lea ecx, [ebp - 0x14]
call fcn.004933c0
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], 0x583c78
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 0x10
cmp eax, 0xffffffff
jne 0x4aec2a
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
lea ecx, [edi + 0xd4]
mov edx, eax
mov dword [ebp + 0xc], ecx
push ecx
lea ecx, [ebp - 0x30]
call fcn.004967d0
add esp, 4
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x14]
mov eax, dword [eax]
mov edi, dword [ebp - 0x14]
mov dword [ebp + 8], eax
call fcn.00492fa0
test al, al
je 0x4aeb13
add edi, 8
push dword [ebp + 8]
push edi
push 0x104
push dword [ebp + 0xc]
call fcn.0049cd80
add esp, 0x10
mov byte [ebp - 4], 0x10
mov eax, esi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4aeb45
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [0x5dc4e4], 0
je 0x4aeccc
call fcn.00409310
mov ecx, eax
test ecx, ecx
je 0x4aee8b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x15
lea ecx, [ebp + 8]
push 0x17
push str.Failed_to_extract_file:
call fcn.00418fd0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4aeba9
mov edx, eax
lea edi, [edx + 2]
nop dword [eax + eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x4aeb90
sub edx, edi
lea ecx, [ebp + 8]
sar edx, 1
push edx
push eax
call fcn.00418fd0
push 7
push str._Error:
lea ecx, [ebp + 8]
call fcn.00418fd0
push ecx
call ebx
mov edx, eax
lea ecx, [ebp + 0xc]
call fcn.004967d0
add esp, 4
mov byte [ebp - 4], 0x16
mov edx, dword [eax]
test edx, edx
je 0x4aebf0
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4aebd7
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 8]
call fcn.00418fd0
lea eax, [ebp + 8]
mov ecx, 0x5dc4ac
push eax
call fcn.004c5760
mov byte [ebp - 4], 0x15
mov eax, esi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4aec1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov eax, esi
mov edx, dword [ebp + 8]
jmp 0x4aecb7
mov esi, dword [ebp + 8]
cmp esi, dword [edi + 0x7c]
jge 0x4aee75
mov eax, dword [edi + 0x78]
add eax, dword [ebp - 0x18]
push 0
mov ecx, dword [eax + 0x10]
xor eax, eax
add ecx, dword [edi + 0x58]
mov dword [ebp - 0x40], ecx
adc eax, dword [edi + 0x5c]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
push ecx
push dword [edi + 0x88]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4aecd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, eax
lea ecx, [ebp + 0xc]
lea esi, [edi + 0x60]
lea ebx, [edi + 0xd4]
call fcn.004967d0
add esp, 4
mov byte [ebp - 4], 0x1a
mov ecx, esi
mov eax, dword [eax]
mov edi, dword [esi]
mov dword [ebp + 8], eax
call fcn.00492fa0
test al, al
je 0x4aec9b
add edi, 8
push dword [ebp + 8]
push edi
push 0x103
push ebx
call fcn.0049cd80
add esp, 0x10
mov byte [ebp - 4], 0x10
or eax, 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4aeccc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 2
jmp 0x4aedf5
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 0x1c
lea ecx, [ebp - 0x24]
push 0x10000
call fcn.004b1280
mov dword [edi + 0xd0], 0
cmp esi, dword [edi + 0x7c]
jge 0x4aee75
mov eax, dword [edi + 0x78]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x28], 0
mov edx, dword [ecx + eax + 8]
mov ecx, dword [ecx + eax + 0xc]
shr edx, 1
and edx, 0xffffff01
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x30], edx
test ebx, ebx
je 0x4aed3f
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x24]
call eax
test al, al
jne 0x4aee6b
mov ecx, dword [ebp + 0xc]
mov eax, ecx
cmp ecx, 0x10000
mov ecx, 0x10000
push 0
cmova eax, ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
push esi
push dword [edi + 0x88]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4aedc9
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4aedc9
cmp byte [ebp - 0x30], 0
je 0x4aed84
push eax
lea ecx, [edi + 0xc8]
push esi
call fcn.004cd480
mov eax, dword [ebp - 0x20]
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4aedc9
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4aedc9
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x28]
sub ecx, eax
add edx, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x28], edx
test ebx, ebx
je 0x4aedc1
mov eax, dword [ebx]
mov ecx, ebx
push 0
push edx
call dword [eax + 0x20]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x4aed27
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x7c]
jge 0x4aee75
mov eax, dword [edi + 0x78]
add eax, dword [ebp - 0x18]
xor edi, edi
mov byte [eax + 0x1c], 1
mov byte [ebp - 4], 0x10
push esi
call fcn.00521d18
add esp, 4
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], 0x583c78
test eax, eax
je 0x4aee15
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x34], 0
or esi, 0xffffffff
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4aee36
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4aee55
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, 0xf
jmp 0x4aede1
push 1
push 0xc000008c
call fcn.00411080
push 0x80004005
call fcn.00408fe0
push 0x80004005
call fcn.00408fe0
nop dword [eax]
jecxz 0x4aee81
dec edx
add ah, ch
out 0x4a, eax
add byte [eax], al
add byte [ecx], al
add dword [ecx], eax
add byte [eax], al
int3