Function at 0x180046590
Capabilities:
Delete file
Enumerate files on windows
Move file
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1820]
mov eax, 0x1920
call fcn.180090180
sub rsp, rax
mov qword [rbp - 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x1970], rbx
mov rax, qword [0x18012c3a8]
xor rax, rsp
mov qword [rbp + 0x1810], rax
mov rbx, rdx
mov qword [rbp - 0x78], rdx
mov rsi, rcx
mov qword [rbp - 0x70], rcx
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp - 0x2e]
call fcn.1800abaa0
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x1e0]
call fcn.1800abaa0
xor r12d, r12d
lea r13, [r12 - 1]
test rbx, rbx
jne 0x18004661c
mov eax, 1
jmp 0x180046d22
cmp r12w, word [rbx]
je 0x180046612
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, dword [rsi + 0xc70]
inc eax
cdq
xor eax, edx
sub eax, edx
mov dword [rsi + 0xc70], eax
mov word [rbp - 0x30], r12w
lea rax, str..log2
mov qword [rsp + 0x28], rax
lea rax, str.New360_formal_
mov qword [rsp + 0x20], rax
lea r9, [rsi + 0x444]
lea r8, str._s_s_s
mov edx, 0x104
lea rcx, [rbp + 0x600]
call fcn.18002d2f0
lea rdx, [rbp + 0x810]
lea rcx, [rbp + 0x600]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
mov edi, 1
cmp rax, r13
je 0x1800467df
nop dword [rax]
test byte [rbp + 0x810], 0x10
jne 0x18004676e
lea rax, [rbp + 0x83c]
mov qword [rsp + 0x20], rax
lea r9, [rsi + 0x444]
lea r8, [0x1800fcd98]
mov edx, 0x104
lea rcx, [rbp + 0x3f0]
call fcn.18002d2f0
mov ecx, dword [rbp + 0x82c]
shl rcx, 0x20
mov eax, dword [rbp + 0x830]
add rcx, rax
cmp rcx, 0x200000
jg 0x18004676e
mov r13, 0xffffffffffffffff
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x12019f
lea r8d, [r13 + 4]
lea rcx, [rbp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, r13
je 0x18004676e
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
mov r9d, edi
xor r8d, r8d
lea edx, [r13 + 4]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x180046787
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp + 0x810]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x1800467d2
jmp 0x1800466a0
mov r13, rbx
mov edx, 0x104
lea rcx, [rbp - 0x30]
lea r8, [rbp + 0x3f0]
lea rax, [rbp - 0x30]
sub r8, rax
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1800467c3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1800467c3
mov word [rcx], ax
add rcx, 2
sub rdx, rdi
jne 0x1800467a1
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r12w
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rbx, qword [rbp - 0x78]
cmp r12w, word [rbp - 0x30]
jne 0x180046902
lea rdx, [rbp - 0x30]
mov rcx, rsi
call fcn.180046d60
test eax, eax
je 0x180046d1f
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x12019f
lea r8d, [r9 + 3]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x180046873
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
mov r9d, edi
xor r8d, r8d
lea edx, [r8 + 3]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x180046902
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsi + 0xc70]
inc eax
cdq
xor eax, edx
sub eax, edx
mov dword [rsi + 0xc70], eax
lea rdx, [rbp - 0x30]
mov rcx, rsi
call fcn.180046d60
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x12019f
lea r8d, [r9 + 3]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x180046d1f
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
mov r9d, edi
xor r8d, r8d
lea edx, [r8 + 3]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
je 0x180046d16
lea rax, str..mg2
mov qword [rsp + 0x20], rax
mov r9, rbx
lea r8, [0x1800fcd50]
mov edx, 0x104
lea rcx, [rbp + 0x1e0]
call fcn.18002d2f0
mov r8d, edi
lea rdx, [rbp + 0x1e0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x180046ce4
lea r8, [rbp + 0x810]
xor edx, edx
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x180046ce4
mov ecx, dword [rbp + 0x82c]
shl rcx, 0x20
mov eax, dword [rbp + 0x830]
add eax, ecx
mov dword [rbp - 0x7c], eax
cmp eax, 0x300000
jbe 0x180046afe
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp + 0x810]
call fcn.1800abaa0
mov ebx, r12d
mov dword [rbp - 0x80], r12d
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x12019f
lea r8d, [r9 + 3]
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp - 0x68], rax
cmp rax, 0xffffffffffffffff
je 0x180046aec
lea rdx, [rsi + 0xcd4]
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x80]
mov r8d, 0xc8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180046ade
cmp dword [rbp - 0x80], 0xc8
jne 0x180046ade
xor ecx, ecx
call fcn.1800aefe0
mov rdx, rax
lea r8, [rbp - 0x58]
call fcn.180045fd0
lea rdx, [rsi + 0xb5c]
lea r8, [rsi + 0xa5c]
lea r10, [rsi + 0x244]
lea r11, [rsi + 0x44]
movzx ebx, word [rbp - 0x4c]
movzx edi, word [rbp - 0x4e]
movzx esi, word [rbp - 0x50]
movzx r14d, word [rbp - 0x52]
movzx r15d, word [rbp - 0x56]
movzx r9d, word [rbp - 0x58]
mov eax, dword [rbp - 0x7c]
mov dword [rsp + 0x78], eax
lea rax, str.log_file_is_too_big_to_merge_
mov qword [rsp + 0x70], rax
mov rax, qword [rbp - 0x70]
mov eax, dword [rax + 0xc6c]
mov dword [rsp + 0x68], eax
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x50], r10
mov qword [rsp + 0x48], r11
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
lea r8, str._t_4d__02d__02d__02d:_02d:_02d__p_s__c_s__m_s__m2_s__lan_d__warning_s__logfile_len_d_bytes__n
mov edx, 0x800
lea rcx, [rbp + 0x810]
call fcn.18002d2f0
lea r8, [rbp + 0x810]
mov rcx, qword [rbp - 0x70]
call fcn.180046fd0
mov ebx, r12d
test eax, eax
mov edi, 1
cmovne ebx, edi
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x180046afe
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x180046ce4
cmp r13, 0xffffffffffffffff
je 0x180046ce1
mov qword [rbp - 0x58], r12
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x48], r12
mov edx, 0x40000
lea rcx, [rbp - 0x58]
call fcn.1800479a0
mov rax, qword [rbp - 0x50]
mov rbx, qword [rbp - 0x58]
sub rax, rbx
cmp rax, 0x40000
je 0x180046b84
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x180046ce1
mov rdx, qword [rbp - 0x48]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180046b6e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180046d58
call fcn.18008f874
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x58], xmm0
mov qword [rbp - 0x48], r12
jmp 0x180046ce1
mov dword [rbp - 0x80], r12d
mov dword [rbp - 0x7c], r12d
mov r14d, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, edi
mov edx, 0x120089
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x180046c00
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x180046ce1
mov rdx, qword [rbp - 0x48]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180046b6e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180046d52
jmp 0x180046b6e
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x80]
mov r8d, 0x40000
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180046c7c
mov r8d, dword [rbp - 0x80]
test r8d, r8d
je 0x180046c7c
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x7c]
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180046c7f
mov eax, dword [rbp - 0x80]
cmp dword [rbp - 0x7c], eax
jne 0x180046c7f
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x80]
mov r8d, 0x40000
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180046c33
mov r14d, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x180046ccf
mov rdx, qword [rbp - 0x48]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180046cbe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180046d4c
call fcn.18008f874
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x58], xmm0
mov qword [rbp - 0x48], r12
test r14d, r14d
je 0x180046ce1
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r12d, edi
cmp r13, 0xffffffffffffffff
je 0x180046d1f
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, edi
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r12d
mov rcx, qword [rbp + 0x1810]
xor rcx, rsp
call fcn.18008f850
mov rbx, qword [rsp + 0x1970]
add rsp, 0x1920
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1800aee30
int3
call fcn.1800aee30
int3
call fcn.1800aee30
int3