Function at 0x4a9710
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x298
lea rax, [rsp + 0x70]
mov rbx, rcx
mov rbp, r9
mov qword [rsp + 0x2e8], rdx
mov rcx, rax
mov rdx, r9
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x2f0], r8
call fcn.004cebf6
mov rax, qword [rsp + 0x70]
cmp dword [rax], 0
jne 0x4a97ad
lea r12, [rsp + 0x188]
lea r13, [rsp + 0x80]
mov ecx, 0x104
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
mov r9, r12
xor r8d, r8d
mov rcx, r13
lea rdx, [0x0053690e]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov rcx, qword [rsp + 0x48]
mov rdx, r12
call fcn.004ceeca
lea rcx, [0x00536a20]
call sym.winbox.exe_getObjectMap_unsigned_int_const_
mov dword [rsp + 0x44], 0
mov rdi, rax
lea rax, [rbx + 0xa8]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x2e8]
mov rdx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rsp + 0x50], rax
sub rax, rdx
sar rax, 2
cmp dword [rsp + 0x44], eax
jae 0x4a9b92
mov eax, dword [rsp + 0x44]
mov rcx, rdi
mov edx, dword [rdx + rax*4]
mov rax, qword [rdi]
call qword [rax + 0xd8]
mov r12, rax
test rax, rax
je 0x4a9b89
mov eax, dword [rax + 0x18]
lea r14, [rbx + 0x40]
lea r13, [rsp + 0x188]
mov rdx, r13
mov rcx, r14
mov dword [rsp + 0x188], eax
call fcn.004d087e
lea rdx, [rbx + 0x48]
cmp rdx, rax
jne 0x4a9b89
mov eax, dword [r12 + 0x18]
mov r8, r13
mov rdx, r14
lea rcx, [rsp + 0x60]
lea r9, [0x004d6e50]
lea r14, [rsp + 0x80]
mov dword [rsp + 0x188], eax
call fcn.004d0212
lea rcx, [rbx + 0xd8]
mov rdx, r12
call fcn.0052a8d0
lea r8, [0x00536911]
mov edx, 0x105
mov rcx, r13
mov rax, qword [rax]
add rax, 4
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x70]
lea r9, [rax + 4]
call fcn.0052fc10
mov rax, qword [rbp]
cmp dword [rax], 0
jne 0x4a98d1
mov rdx, r13
mov rcx, r14
call fcn.004cec4e
mov rcx, qword [rsp + 0x2f0]
mov rdx, r14
call fcn.00518830
mov rcx, r14
call fcn.004cea4a
lea rcx, [rbx + 0x98]
mov rdx, r12
call fcn.0052a8d0
cmp dword [rax], 5
jne 0x4a9a11
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [r12 + 0x18]
mov rcx, r14
mov dword [rsp + 0x50], eax
call fcn.004cf720
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x1d0]
mov r15, rax
test rax, rax
je 0x4a9926
mov rax, qword [rax]
mov rsi, qword [rax - 0x18]
add rsi, r15
inc dword [rsi + 8]
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 0x10]
mov rsi, rax
test rax, rax
je 0x4a99bf
mov rcx, qword [rsp + 0x58]
mov rdx, rax
call fcn.0052a8d0
mov edx, dword [rsp + 0x50]
cmp dword [rax], edx
jne 0x4a9926
mov r12d, dword [rsi + 0x18]
mov rcx, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x88]
sub rsi, rcx
call fcn.004d20e2
sar rsi, 2
shr eax, 2
cmp esi, eax
jne 0x4a99a6
mov rdx, qword [rsp + 0x88]
sub rdx, qword [rsp + 0x80]
mov eax, 1
mov rcx, r14
sar rdx, 2
mov r8d, 4
add edx, edx
cmove edx, eax
shl edx, 2
call fcn.004cf756
mov rax, qword [rsp + 0x88]
mov dword [rax], r12d
add qword [rsp + 0x88], 4
jmp 0x4a9926
lea r14, [rsp + 0x78]
mov rdx, r13
lea r12, [rsp + 0x80]
mov rcx, r14
call fcn.004cec4e
mov r9, r14
mov rdx, r12
mov rcx, rbx
mov r8, qword [rsp + 0x2f0]
call fcn.004a9710
mov rcx, r14
call fcn.004cea4a
mov rax, qword [r15]
mov rcx, qword [rax - 0x18]
add rcx, r15
call fcn.00515350
mov rcx, r12
call fcn.004a8f24
jmp 0x4a9b89
mov rax, qword [rbp]
cmp dword [rax], 0
jne 0x4a9a56
mov rcx, r13
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, rax
cmp rax, 0xffffffffffffffff
je 0x4a9a56
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x80], 0
mov rcx, r14
mov qword [rsp + 0x88], 0
mov dword [rsp + 0x90], 0
call fcn.004cebac
lea rcx, [rsp + 0x88]
call fcn.004cebac
mov rcx, qword [rbx + 0x30]
mov rsi, qword [rbx + 0x38]
movabs rax, 0xaaaaaaaaaaaaaaab
sub rsi, rcx
sar rsi, 3
imul rsi, rax
call fcn.004d20e2
mov ecx, 0x18
xor edx, edx
div ecx
cmp esi, eax
jne 0x4a9af3
mov rdx, qword [rbx + 0x38]
sub rdx, qword [rbx + 0x30]
lea rcx, [rbx + 0x30]
movabs rax, 0xaaaaaaaaaaaaaaab
sar rdx, 3
mov r8d, 0x18
imul rdx, rax
mov eax, 1
add edx, edx
cmove edx, eax
imul edx, edx, 0x18
call fcn.004cf756
mov rsi, qword [rbx + 0x38]
mov rdx, r14
mov rcx, rsi
call fcn.004cebf6
lea r8, [rsp + 0x88]
lea rcx, [rsi + 8]
mov rdx, r8
mov qword [rsp + 0x50], r8
call fcn.004cebf6
mov eax, dword [rsp + 0x90]
mov r8, qword [rsp + 0x50]
mov dword [rsi + 0x10], eax
mov rcx, r8
add qword [rbx + 0x38], 0x18
call fcn.004cea4a
mov rcx, r14
call fcn.004cea4a
mov rsi, qword [rbx + 0x38]
lea rcx, [rbx + 0xb8]
mov rdx, r12
call fcn.0052a8d0
lea rcx, [rsi - 0x18]
mov rdx, rax
cmp rcx, rax
je 0x4a9b63
call fcn.004ceeb2
lea rcx, [rsi - 0x10]
mov rdx, r13
call fcn.004ceeca
lea rcx, [rbx + 0xc8]
mov rdx, r12
call fcn.0052a8d0
mov eax, dword [rax]
mov dword [rsi - 8], eax
add dword [rbx + 0x84], eax
inc dword [rsp + 0x44]
jmp 0x4a97d0
mov rcx, qword [rsp + 0x48]
call fcn.004cea4a
nop
add rsp, 0x298
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret