Function at 0x180002d80
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4140]
mov eax, 0x4240
call fcn.1800401b0
sub rsp, rax
mov qword [rbp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x4298], rbx
mov rax, qword [0x1800bb120]
xor rax, rsp
mov qword [rbp + 0x4130], rax
mov r13, r8
mov qword [rsp + 0x78], r8
mov qword [rbp + 0x38], rdx
mov qword [rbp + 0x10], rcx
mov rax, qword [rcx]
test rax, rax
jne 0x180002de4
mov eax, 6
jmp 0x180003766
mov qword [rbp + 0x70], rax
lea rax, [0x180002bf0]
mov qword [rbp + 0x60], rax
lea rax, [0x180002b50]
mov qword [rbp + 0x68], rax
lea rax, [0x180008d30]
mov qword [rbp + 0x90], rax
lea rax, [0x180008db0]
mov qword [rbp + 0x98], rax
lea rax, [0x180008dc0]
mov qword [rbp + 0xa0], rax
lea rax, [0x180008e30]
mov qword [rbp + 0xa8], rax
lea rax, [rbp + 0x60]
mov qword [rbp + 0xb0], rax
lea rax, [0x180008bf0]
mov qword [rsp + 0x50], rax
lea rax, [0x180008c00]
mov qword [rsp + 0x58], rax
lea rax, [0x180008bf0]
mov qword [rbp + 0x50], rax
lea rax, [0x180008c00]
mov qword [rbp + 0x58], rax
call fcn.180008c10
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x70], xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp - 0x60], xmm1
xor edi, edi
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], rdi
mov dword [rbp - 0x40], edi
mov qword [rbp - 0x28], rdi
movdqa xmmword [rbp - 0x20], xmm0
movdqa xmmword [rbp - 0x10], xmm1
mov qword [rbp], rdi
mov qword [rbp + 8], rdi
lea r9, [rbp + 0x50]
lea r8, [rsp + 0x50]
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x70]
call fcn.180008090
mov r12d, eax
test eax, eax
je 0x180003061
mov rdx, qword [rbp - 0x28]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x20]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x18]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x10]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 8]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov r15, qword [rbp - 0x58]
test r15, r15
je 0x180002fe5
mov eax, dword [rbp - 0x44]
test eax, eax
je 0x180002fe5
lea rbx, [r15 + 0x10]
mov r14d, eax
cmp qword [rbx - 0x10], 0
je 0x180002f78
mov esi, edi
cmp dword [rbx + 0x10], 0
jbe 0x180002f78
xor r13d, r13d
nop word [rax + rax]
mov edi, esi
shl rdi, 5
add rdi, qword [rbx - 0x10]
mov rdx, qword [rdi + 0x10]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], r13
inc esi
cmp esi, dword [rbx + 0x10]
jb 0x180002f50
xor edi, edi
mov rdx, qword [rbx - 0x10]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbx - 8]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbx]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbx + 8]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov qword [rbx - 0x10], rdi
mov qword [rbx - 8], rdi
mov qword [rbx], rdi
mov qword [rbx + 8], rdi
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0
mov qword [rbx + 0x20], 0
add rbx, 0x38
sub r14, 1
jne 0x180002f38
mov r13, qword [rsp + 0x78]
mov rdx, qword [rbp - 0x70]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x68]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x60]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, r15
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x50]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x70], xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp - 0x60], xmm1
mov rdx, rdi
mov qword [rbp - 0x50], rdx
mov qword [rbp - 0x48], 0
mov ecx, edi
mov dword [rbp - 0x40], ecx
mov qword [rbp - 0x28], rdi
movdqa xmmword [rbp - 0x20], xmm0
movdqa xmmword [rbp - 0x10], xmm1
mov qword [rbp], rdi
mov qword [rbp + 8], rdi
jmp 0x180003068
mov ecx, dword [rbp - 0x40]
mov rdx, qword [rbp - 0x50]
test r12d, r12d
jne 0x180002dda
mov qword [rbp - 0x80], rdi
mov dword [rsp + 0x6c], 0xffffffff
mov qword [rbp + 0x30], rdi
mov eax, edi
mov dword [rsp + 0x68], eax
test ecx, ecx
je 0x1800036ed
movzx esi, byte [rsp + 0x60]
nop dword [rax]
nop dword [rax + rax]
mov ebx, eax
mov r15d, eax
shl r15, 5
add r15, rdx
lea rcx, [rbp + 0x50]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x40], rcx
lea rcx, [rbp + 0x48]
mov qword [rsp + 0x38], rcx
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x30], rcx
lea rcx, [rbp + 0x30]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x6c]
mov r8d, eax
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x70]
call fcn.180008570
mov r12d, eax
mov dword [rsp + 0x64], eax
mov rdi, qword [rbp - 8]
test eax, eax
jne 0x1800036e5
mov rdx, qword [rdi + rbx*8 + 8]
sub rdx, qword [rdi + rbx*8]
cmp rdx, 1
jb 0x1800036e5
lea rcx, [rbp + 0x18]
call fcn.180003840
nop
mov rax, qword [rdi + rbx*8]
mov rdx, qword [rdi + rbx*8 + 8]
sub rdx, rax
mov r14, qword [rbp + 0x18]
test r14, r14
je 0x180003172
mov rcx, qword [rbp]
lea r8, [rcx + rax*2]
test rdx, rdx
je 0x180003172
mov rcx, r14
sub r8, r14
nop dword [rax]
nop word [rax + rax]
movzx eax, word [r8 + rcx]
mov word [rcx], ax
lea rcx, [rcx + 2]
sub rdx, 1
jne 0x180003160
mov qword [rbp + 0x40e8], 7
xor eax, eax
mov qword [rbp + 0x40e0], rax
mov word [rbp + 0x40d0], ax
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, qword [rbp + 0x38]
lea rcx, [rbp + 0x40d0]
call fcn.180003ab0
nop
mov rbx, qword [rbp + 0x20]
mov ecx, 7
mov qword [rbp + 0x4128], rcx
xor eax, eax
mov qword [rbp + 0x4120], rax
mov word [rbp + 0x4110], ax
lea rdi, [rbx - 2]
sub rdi, r14
sar rdi, 1
cmp rdi, rcx
je 0x18000324f
movabs rdx, 0x7ffffffffffffffe
cmp rdi, rdx
ja 0x1800035d4
cmp rdi, rcx
jbe 0x180003207
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp + 0x4110]
call fcn.180004490
mov rcx, qword [rbp + 0x4128]
jmp 0x180003229
cmp rdi, 8
jae 0x180003216
mov qword [rbp + 0x4128], rcx
jmp 0x18000321b
test rdi, rdi
jne 0x18000322e
mov word [rbp + 0x4110], ax
mov qword [rbp + 0x4120], rax
test rdi, rdi
je 0x18000324f
xor edi, edi
mov qword [rbp + 0x4120], rdi
lea rax, [rbp + 0x4110]
cmp rcx, 8
cmovae rax, qword [rbp + 0x4110]
mov word [rax], di
jmp 0x180003251
xor edi, edi
lea r8, [rbx - 2]
mov rdx, r14
lea rcx, [rbp + 0x4110]
call fcn.180004c90
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0x4110]
lea rcx, [rbp + 0x40d0]
call fcn.180003bf0
nop
mov r8, qword [rbp + 0x4128]
cmp r8, 8
jb 0x1800032a3
inc r8
mov rdx, qword [rbp + 0x4110]
lea rcx, [rbp + 0x4110]
call fcn.180003e80
test r13, r13
je 0x1800032ca
lea rax, [rbp + 0x40d0]
cmp r13, rax
je 0x1800032ca
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0x40d0]
mov rcx, r13
call fcn.180003ab0
lea rdx, [rbp + 0x40d0]
cmp byte [r15 + 0x19], 0
je 0x18000341e
mov r12, qword [rbp + 0x10]
lea rcx, [r12 + 8]
call fcn.180004800
mov rbx, rax
mov rdi, qword [r12 + 8]
mov r15, qword [rbp + 0x40e8]
mov r13, qword [rbp + 0x40d0]
cmp rax, rdi
je 0x18000333c
lea r8, [rax + 0x20]
lea r9, [r8 + 0x10]
cmp qword [r8 + 0x18], 8
jb 0x180003317
mov r8, qword [r8]
lea rcx, [rbp + 0x40d0]
cmp r15, 8
cmovae rcx, r13
mov r9, qword [r9]
mov rdx, qword [rbp + 0x40e0]
call fcn.1800048c0
shr eax, 0x1f
test al, al
je 0x18000333f
mov rbx, rdi
cmp rbx, rdi
jne 0x18000337b
lea rcx, [rbp + 0x40d0]
call fcn.180008870
mov byte [rsp + 0x20], sil
lea r9, [rbp + 0x40d0]
lea rdx, [rbp + 0x80]
lea rcx, [r12 + 8]
call fcn.180004a70
mov r15, qword [rbp + 0x40e8]
mov r13, qword [rbp + 0x40d0]
cmp r15, 8
jb 0x180003394
lea r8, [r15 + 1]
mov rdx, r13
lea rcx, [rbp + 0x40d0]
call fcn.180003e80
mov qword [rbp + 0x40e8], 7
xor eax, eax
mov qword [rbp + 0x40e0], rax
mov word [rbp + 0x40d0], ax
test r14, r14
je 0x1800035ae
mov rax, qword [rbp + 0x28]
sub rax, r14
sar rax, 1
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
ja 0x1800035f9
add rax, rax
cmp rax, 0x1000
jb 0x180003411
test r14b, 0x1f
jne 0x1800035f3
mov rax, qword [r14 - 8]
cmp rax, r14
jae 0x1800035ed
sub r14, rax
cmp r14, 8
jb 0x1800035e7
cmp r14, 0x27
ja 0x1800035e1
mov r14, rax
mov rcx, r14
call fcn.18003f87c
jmp 0x1800035ae
mov qword [rbp + 0x4108], 7
mov qword [rbp + 0x4100], rdi
mov word [rbp + 0x40f0], di
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rbp + 0x40f0]
call fcn.180003ab0
nop
mov r9d, 1
lea rdx, [0x1800a5998]
lea rcx, [rbp + 0x40f0]
call fcn.1800039e0
cmp rax, 0xffffffffffffffff
je 0x180003479
cmp qword [rbp + 0x4100], rax
jb 0x1800035ff
jmp 0x1800034a5
mov r9d, 1
lea rdx, [0x1800a599c]
lea rcx, [rbp + 0x40f0]
call fcn.1800039e0
cmp rax, 0xffffffffffffffff
je 0x1800034c7
cmp qword [rbp + 0x4100], rax
jb 0x18000360c
lea rcx, [rbp + 0x40f0]
cmp qword [rbp + 0x4108], 8
mov qword [rbp + 0x4100], rax
cmovae rcx, qword [rbp + 0x40f0]
mov word [rcx + rax*2], di
lea rdx, [rbp + 0x40f0]
mov rcx, qword [rbp + 0x10]
call fcn.180003790
lea rcx, [rbp + 0x40d0]
cmp qword [rbp + 0x40e8], 8
cmovae rcx, qword [rbp + 0x40d0]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18000365f
mov rdx, qword [rbp - 0x80]
add rdx, qword [rbp + 0x40]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x70]
mov rdi, qword [rbp + 0x48]
mov r8d, edi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180003619
mov eax, dword [rsp + 0x70]
cmp rax, rdi
jne 0x180003619
cmp byte [r15 + 0x1c], 0
je 0x180003578
mov r9, r15
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x180003619
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180003654
lea rcx, [rbp + 0x40f0]
call fcn.1800038f0
nop
lea rcx, [rbp + 0x40d0]
call fcn.1800038f0
nop
lea rcx, [rbp + 0x18]
call fcn.180003940
jmp 0x1800035b8
mov r13, qword [rsp + 0x78]
mov r12d, dword [rsp + 0x64]
mov eax, dword [rsp + 0x68]
inc eax
mov dword [rsp + 0x68], eax
cmp eax, dword [rbp - 0x40]
jae 0x1800036ed
mov rdx, qword [rbp - 0x50]
jmp 0x1800030a0
lea rcx, str.string_too_long
call fcn.18003cdec
nop
call fcn.1800625e0
int3
call fcn.1800625e0
int3
call fcn.1800625e0
int3
call fcn.1800625e0
int3
call fcn.1800625e0
nop
lea rcx, str.invalid_string_position
call fcn.18003ce10
int3
lea rcx, str.invalid_string_position
call fcn.18003ce10
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp + 0x40f0]
call fcn.1800038f0
nop
lea rcx, [rbp + 0x40d0]
call fcn.1800038f0
nop
lea rcx, [rbp + 0x18]
call fcn.180003940
jmp 0x1800036ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
jmp 0x18000362c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov r8, qword [rbp + 0x4108]
cmp r8, 8
jb 0x18000368b
inc r8
mov rdx, qword [rbp + 0x40f0]
lea rcx, [rbp + 0x40f0]
call fcn.180003e80
mov qword [rbp + 0x4108], 7
mov qword [rbp + 0x4100], rdi
mov word [rbp + 0x40f0], di
mov r8, qword [rbp + 0x40e8]
cmp r8, 8
jb 0x1800036c7
inc r8
mov rdx, qword [rbp + 0x40d0]
lea rcx, [rbp + 0x40d0]
call fcn.180003e80
mov qword [rbp + 0x40e8], 7
mov qword [rbp + 0x40e0], rdi
mov word [rbp + 0x40d0], di
jmp 0x180003646
mov r12d, 6
jmp 0x1800036f1
mov rdi, qword [rbp - 8]
mov rdx, qword [rbp - 0x80]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x28]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x20]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x18]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp - 0x10]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, rdi
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
mov rdx, qword [rbp]
lea rcx, [rsp + 0x50]
call qword [rsp + 0x58]
xor eax, eax
mov qword [rbp], rax
mov qword [rbp + 8], rax
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.180005400
mov eax, r12d
mov rcx, qword [rbp + 0x4130]
xor rcx, rsp
call fcn.18003ff90
mov rbx, qword [rsp + 0x4298]
add rsp, 0x4240
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret