Function at 0x180016bb0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1fa0]
mov eax, 0x20a0
call fcn.180060440
sub rsp, rax
mov rax, qword [0x1800737f8]
xor rax, rsp
mov qword [rbp + 0x1f90], rax
mov rdi, qword [rbp + 0x2000]
mov rsi, r8
imul eax, ecx, 0x86c
mov r15, rdx
mov qword [rsp + 0x58], r9
mov r12d, ecx
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x50], eax
cmp ecx, eax
ja 0x180016f91
mov r13, qword [rsp + 0x58]
xor ebx, ebx
mov r14d, dword [rsp + 0x34]
movabs rdx, 0x320033005f0032
cmp r12d, 0x10e60
ja 0x180016eed
je 0x180016ec7
cmp r12d, 0x11b
ja 0x180016e50
je 0x180016d29
mov eax, r12d
sub eax, 0x2b
je 0x180016ca6
sub eax, 0x5d
je 0x180016c88
cmp eax, 0x58
jne 0x18001704a
movzx eax, word [0x180066c4a]
mov word [rsp + 0x70], ax
movzx eax, byte [0x180066c4c]
mov byte [rsp + 0x72], al
mov byte [rsp + 0x73], bl
jmp 0x18001704a
mov eax, 0x1f
nop dword [rax]
cmp eax, 0x1f
je 0x180017068
add eax, 0x3e
cmp eax, 0x3e
jbe 0x180016c90
jmp 0x180016f1f
test r15, r15
je 0x180016d0a
mov eax, dword [0x180073ef8]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], eax
lea rdx, [rsp + 0x48]
mov eax, dword [0x180073efc]
mov r8d, 0x104
mov rcx, r15
mov dword [rsp + 0x48], eax
call fcn.1800198a0
test al, al
je 0x180016d06
test rsi, rsi
je 0x180016cec
mov eax, dword [0x180073efc]
sub eax, dword [r15 + 0x10]
mov dword [rsi], eax
test rdi, rdi
je 0x180017046
mov eax, dword [0x180073ef8]
sub eax, dword [r15 + 0x14]
mov dword [rdi], eax
jmp 0x180017046
mov ecx, dword [rsp + 0x30]
test rsi, rsi
je 0x180016d15
mov dword [rsi], 0xffffffff
test rdi, rdi
je 0x18001704a
mov dword [rdi], 0xffffffff
jmp 0x18001704a
test rsi, rsi
je 0x180016e07
cmp qword [r15 + 0x10], rsi
jne 0x180016d87
mov ecx, 0x103
nop dword [rax]
mov eax, ecx
sub eax, 0x102
je 0x180016d5e
cmp eax, 1
jne 0x180016d7b
mov rax, qword [rsi + 0x10]
mov r13, rsi
test rax, rax
cmovne r13, rax
jmp 0x180016d7b
mov rax, qword [r15 + 0x20]
mov qword [rsi + 0x20], rax
mov rax, qword [r15 + 0x18]
mov qword [rsi + 0x18], rax
mov rax, qword [r15 + 0x18]
test rax, rax
je 0x180016d7b
mov qword [rax + 0x20], rsi
dec ecx
cmp ecx, 0x101
ja 0x180016d40
jmp 0x180016de7
mov ecx, 0x74
nop dword [rax]
mov eax, ecx
sub eax, 0x71
je 0x180016dd3
sub eax, 1
je 0x180016dbd
sub eax, 1
je 0x180016dab
cmp eax, 1
jne 0x180016de0
mov r13, rsi
jmp 0x180016de0
mov rax, qword [rsi + 0x20]
mov qword [rax + 0x18], rbx
mov rax, qword [r15 + 0x20]
mov qword [rsi + 0x20], rax
jmp 0x180016de0
mov rax, qword [r15 + 0x18]
mov qword [rsi + 0x18], rax
mov rax, qword [r15 + 0x10]
mov qword [rsi + 0x10], rax
mov rax, qword [r15 + 0x10]
jmp 0x180016dd7
mov rax, qword [r15 + 0x18]
test rax, rax
je 0x180016de0
mov qword [rax + 0x20], rsi
dec ecx
cmp ecx, 0x70
ja 0x180016d90
mov rax, qword [r15 + 0x20]
test rax, rax
je 0x180016e02
cmp qword [rax + 0x10], r15
jne 0x180016dfc
mov qword [rax + 0x10], rsi
jmp 0x180016e29
mov qword [rax + 0x18], rsi
jmp 0x180016e29
mov qword [rdi], rsi
jmp 0x180016e29
mov r13, qword [r15 + 0x20]
mov rax, qword [r15 + 0x18]
test r13, r13
je 0x180016e26
cmp qword [r13 + 0x10], r15
jne 0x180016e20
mov qword [r13 + 0x10], rax
jmp 0x180016e29
mov qword [r13 + 0x18], rax
jmp 0x180016e29
mov qword [rdi], rax
test r13, r13
je 0x180017046
mov r8d, 0xf5
mov rdx, r13
mov rcx, rdi
call fcn.18002f0f0
mov r13, rax
test rax, rax
jne 0x180016e32
jmp 0x180017046
cmp r12d, 0x124
je 0x180016eae
cmp r12d, 0x87a0
je 0x180016e74
cmp r12d, 0xb0cc
je 0x180016f91
jmp 0x18001704a
mov r8d, 1
lea rdx, [0x180066b32]
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat]
mov r8d, 2
mov word [rsp + 0x78], bx
lea rdx, [0x180066ba6]
lea rcx, [rsp + 0x78]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat]
jmp 0x180017046
mov r8, qword [rdi]
mov rcx, r15
mov rdx, qword [rsi]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov qword [rsp + 0x38], rax
jmp 0x180017046
mov qword [rsp + 0x7c], rdx
lea rcx, [rsp + 0x78]
lea rdx, [0x180066ab8]
mov word [rbp - 0x7c], bx
mov r8d, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat]
jmp 0x180017046
cmp r12d, 0x32960
ja 0x180016fc0
je 0x180016f84
cmp r12d, 0x19520
je 0x180016f78
cmp r12d, 0x21be0
je 0x180016f52
cmp r12d, 0x2a2a0
jne 0x18001704a
mov r8, r15
mov edx, 0xef
xor ecx, ecx
call fcn.18004ca20
test al, al
je 0x180016f8d
mov rcx, qword [r15]
lea rdx, [rbp - 0x70]
xor r9d, r9d
mov r8d, 0x2000
call qword [rsp + 0x60]
mov r14d, eax
mov dword [rsp + 0x34], eax
jmp 0x180017046
mov r8d, 0x6e
mov dword [rbp - 0x76], 0x6c
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.1800041c0
mov qword [rsp + 0x60], rax
jmp 0x180017046
mov dword [rbp - 0x78], 0x6c
jmp 0x18001704a
test r14d, r14d
jne 0x18001704a
mov byte [rsp + 0x38], bl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rbp + 0x1f90]
xor rcx, rsp
call fcn.1800604b0
mov rbx, qword [rsp + 0x20e0]
add rsp, 0x20a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp r12d, 0x3b020
je 0x180016fd9
cmp r12d, 0x436e0
jne 0x18001704a
mov byte [rsp + 0x38], 1
jmp 0x180016f91
movsxd rax, dword [rsp + 0x34]
test eax, eax
js 0x180016f8d
mov rcx, qword [rsi + 0x18]
mov r14, rax
mov rdx, qword [rsi + 0x10]
mov rax, rcx
sub rax, rdx
cmp r14, rax
ja 0x18001702a
lea rax, [rdx + r14]
mov qword [rsi + 0x10], rax
mov rax, rsi
cmp rcx, 0x10
jb 0x18001700c
mov rax, qword [rsi]
lea rdi, [rax + rdx]
mov r8, r14
mov rcx, rdi
lea rdx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + r14], bl
mov rdi, qword [rsp + 0x68]
jmp 0x180017041
lea r9, [rbp - 0x70]
mov qword [rsp + 0x20], r14
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call fcn.180002130
mov r14d, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x30]
imul eax, ecx, 0x9a
add r12d, eax
cmp r12d, dword [rsp + 0x50]
ja 0x180016f91
mov r9, qword [rsp + 0x58]
jmp 0x180016c22
test rsi, rsi
je 0x180017087
mov rcx, qword [rdi]
cmp rcx, qword [rsi + 8]
je 0x18001708f
jae 0x18001707e
mov rsi, qword [rsi + 0x10]
jmp 0x180017082
mov rsi, qword [rsi + 0x18]
test rsi, rsi
jne 0x180017070
mov rax, rbx
jmp 0x180016f96
mov rax, rsi
jmp 0x180016f96