Function at 0x140182dd0
Capabilities:
Write file on windows

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x1700
call fcn.1401d5c30
sub rsp, rax
mov rax, qword [0x1402a25c0]
xor rax, rsp
mov qword [rsp + 0x16f8], rax
mov rax, qword [rsp + 0x1710]
cmp qword [rax + 8], 0
jne 0x140182e15
xor al, al
jmp 0x140183156
cmp qword [rsp + 0x1718], 0
jne 0x140182e34
mov rax, qword [rsp + 0x1710]
add rax, 0x10
mov qword [rsp + 0x1718], rax
xor eax, eax
mov word [rsp + 0x850], ax
lea rdi, [rsp + 0x852]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
xor r9d, r9d
lea r8, [rsp + 0x850]
mov edx, 0x104
mov rcx, qword [rsp + 0x1718]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea rcx, [rsp + 0x850]
call fcn.140182a70
movzx eax, al
test eax, eax
jne 0x140182e88
xor al, al
jmp 0x140183156
lea rdx, [rsp + 0xc80]
mov rcx, qword [rsp + 0x1710]
call fcn.140182bc0
xor edx, edx
mov word [rsp + 0xa70], dx
lea rdi, [rsp + 0xa72]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov r8d, 0x104
lea rdx, [rsp + 0xa70]
lea rcx, [rsp + 0xc80]
call fcn.140012ed0
movzx eax, byte [rsp + 0xeb0]
test eax, eax
je 0x140182f4d
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
mov r8, qword [rsp + 0x1718]
xor edx, edx
lea rcx, [rsp + 0x10e0]
call fcn.1400ab9dc
lea rcx, [rsp + 0x10e0]
call fcn.1400a81f4
movzx eax, word [rsp + rax*2 + 0x10de]
cmp eax, 0x5c
jne 0x140182f3b
lea rcx, [rsp + 0x10e0]
call fcn.1400a81f4
mov rdx, rax
xor eax, eax
mov word [rsp + rdx*2 + 0x10de], ax
lea rcx, [rsp + 0x10e0]
call fcn.140182a70
jmp 0x140183156
movzx eax, byte [rsp + 0x1720]
test eax, eax
je 0x140182fa7
lea rax, [rsp + 0x14f0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x12f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xa70]
call fcn.1400ab94c
lea rdx, [rsp + 0x14f0]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x12f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xa70]
call fcn.1400ab9dc
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
lea r8, [rsp + 0x850]
xor edx, edx
lea rcx, [rsp + 0xed0]
call fcn.1400ab9dc
lea rcx, [rsp + 0xed0]
call fcn.140182b50
movzx eax, al
test eax, eax
jne 0x140182fea
xor al, al
jmp 0x140183156
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0xed0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xec0], rax
cmp qword [rsp + 0xec0], 0xffffffffffffffff
jne 0x140183036
xor al, al
jmp 0x140183156
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062550
test eax, eax
je 0x140183052
xor al, al
jmp 0x140183156
mov dword [rsp + 0xa60], 0
mov r8d, 0x800
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062580
mov dword [rsp + 0xa60], eax
cmp dword [rsp + 0xa60], 0
jle 0x1401830e2
mov dword [rsp + 0x16f0], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x16f0]
mov r8d, dword [rsp + 0xa60]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1401830d5
mov eax, dword [rsp + 0xa60]
cmp dword [rsp + 0x16f0], eax
je 0x1401830e2
mov dword [rsp + 0xa60], 0xffffffff
jmp 0x1401830f0
cmp dword [rsp + 0xa60], 0
jg 0x14018305d
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062af0
cmp dword [rsp + 0xa60], 0
jne 0x14018312d
mov edx, dword [rsp + 0xe98]
lea rcx, [rsp + 0xed0]
call fcn.1401825e0
cmp dword [rsp + 0xa60], 0
jne 0x140183144
mov dword [rsp + 0x16f4], 1
jmp 0x14018314f
mov dword [rsp + 0x16f4], 0
mov al, byte [rsp + 0x16f4]
mov rcx, qword [rsp + 0x16f8]
xor rcx, rsp
call fcn.1400a8040
add rsp, 0x1700
pop rdi
ret