Function at 0x140072598
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x1401d1010]
xor rax, rsp
mov qword [rbp - 8], rax
mov r13, rdx
mov r15, rcx
add rdx, 0xd8
lea rcx, [rbp - 0x28]
mov rsi, r8
call fcn.14000cc2c
mov eax, dword [rsi + 0x28]
mov edi, 1
sub eax, 3
cmp eax, edi
jbe 0x1400725e9
mov ecx, dword [rsi]
jmp 0x1400725f4
mov rax, qword [rsi + 0x18]
mov rcx, qword [rax + 8]
mov ecx, dword [rcx + 0x10]
mov eax, dword [rbp - 0x18]
lea r9, [rbp - 0x30]
xor r12d, r12d
lea rdx, [rbp - 0x2c]
mov dword [rbp - 0x30], r12d
mov qword [rsp + 0x20], r12
lea ecx, [rcx + rax*2]
mov rax, qword [r15]
add ecx, 0x26
lea r8d, [r12 + 4]
mov dword [rbp - 0x2c], ecx
mov rcx, qword [rax]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140072635
cmp dword [rbp - 0x30], 4
mov r14d, edi
je 0x140072638
mov r14d, r12d
mov rax, qword [r15]
lea rdx, [r13 + 0x18]
mov dword [rbp - 0x30], r12d
lea r9, [rbp - 0x30]
mov r8d, 0x10
mov qword [rsp + 0x20], r12
mov rcx, qword [rax]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14007266a
cmp dword [rbp - 0x30], 0x10
mov ebx, edi
je 0x14007266d
mov ebx, r12d
mov rax, qword [r15]
lea rdx, [r13 + 0x138]
mov dword [rbp - 0x30], r12d
lea r9, [rbp - 0x30]
mov r8d, 4
mov qword [rsp + 0x20], r12
mov rcx, qword [rax]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400726a5
cmp dword [rbp - 0x30], 4
jne 0x1400726a5
and ebx, r14d
jmp 0x1400726a8
mov ebx, r12d
mov rax, qword [r15]
lea rdx, [r13 + 0x13c]
mov dword [rbp - 0x30], r12d
lea r9, [rbp - 0x30]
mov r13d, 4
mov qword [rsp + 0x20], r12
mov r8d, r13d
mov rcx, qword [rax]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400726e1
mov r14d, edi
cmp dword [rbp - 0x30], r13d
je 0x1400726e4
mov r14d, r12d
mov eax, dword [rbp - 0x18]
lea r9, [rbp - 0x30]
mov dword [rbp - 0x30], r12d
lea rdx, [rbp - 0x2c]
mov r8d, r13d
mov qword [rsp + 0x20], r12
lea eax, [rax*2 + 2]
mov dword [rbp - 0x2c], eax
mov rax, qword [r15]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140072723
cmp dword [rbp - 0x30], r13d
jne 0x140072723
and ebx, r14d
jmp 0x140072726
mov ebx, r12d
mov rax, qword [r15]
lea rdx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
lea r9, [rbp - 0x30]
mov r8d, dword [rbp - 0x2c]
cmovae rdx, qword [rbp - 0x28]
mov dword [rbp - 0x30], r12d
mov rax, qword [rax]
mov qword [rsp + 0x20], r12
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140072762
mov eax, dword [rbp - 0x2c]
cmp dword [rbp - 0x30], eax
mov eax, edi
je 0x140072765
mov eax, r12d
and ebx, eax
mov eax, dword [rsi + 0x28]
sub eax, 3
cmp eax, edi
jbe 0x140072775
mov eax, dword [rsi]
jmp 0x140072780
mov rax, qword [rsi + 0x18]
mov rcx, qword [rax + 8]
mov eax, dword [rcx + 0x10]
mov dword [rbp - 0x2c], eax
lea r9, [rbp - 0x30]
mov rax, qword [r15]
lea rdx, [rbp - 0x2c]
mov dword [rbp - 0x30], r12d
mov r8d, r13d
mov qword [rsp + 0x20], r12
mov rcx, qword [rax]
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400727b0
cmp dword [rbp - 0x30], r13d
je 0x1400727b3
mov ebx, r12d
mov r8d, dword [rbp - 0x2c]
test r8d, r8d
je 0x140072805
mov eax, dword [rsi + 0x28]
mov r9, qword [r15]
sub eax, 3
mov dword [rbp - 0x30], r12d
cmp eax, edi
jbe 0x1400727d3
mov rdx, qword [rsi + 8]
jmp 0x1400727df
mov rax, qword [rsi + 0x18]
mov rcx, qword [rax + 8]
mov rdx, qword [rcx + 8]
mov rax, qword [r9]
lea r9, [rbp - 0x30]
mov qword [rsp + 0x20], r12
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140072800
mov eax, dword [rbp - 0x2c]
cmp dword [rbp - 0x30], eax
je 0x140072803
mov edi, r12d
and ebx, edi
mov rax, qword [rbp - 0x10]
cmp rax, 8
jb 0x140072844
mov rcx, qword [rbp - 0x28]
lea rax, [rax*2 + 2]
mov rdx, rcx
cmp rax, 0x1000
jb 0x14007283e
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x14007283e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, ebx
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140107ad0
mov rbx, qword [rsp + 0xb8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret