Function at 0x140033640
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov eax, dword [rsp + 0xd0]
mov qword [rsp + 0xb8], rdx
mov rsi, rcx
mov edx, dword [rsp + 0xd8]
mov ebx, r8d
test rcx, rcx
je 0x140033904
mov r10, qword [rcx]
test r10, r10
je 0x140033904
mov edi, edx
mov r14d, eax
mov r15d, eax
mov r13d, eax
shr edi, 8
mov r12d, edx
mov ebp, ebx
shr r14d, 8
mov dword [rsp + 0x3c], edi
movzx ecx, byte [rsp + 0x3c]
shr r15d, 0x10
shr ebp, 0x10
shr r13d, 0x18
shr r12d, 0x10
mov byte [rsp + 0x36], al
mov byte [rsp + 0x33], cl
mov ecx, edx
shr ecx, 0x18
mov byte [rsp + 0x37], r14b
mov dword [rsp + 0x40], ecx
movzx r11d, byte [rsp + 0x40]
mov ecx, r9d
shr ecx, 8
mov byte [rsp + 0x38], r15b
mov byte [rsp + 0x35], r11b
mov r11d, ebx
shr r11d, 8
mov dword [rsp + 0x48], ecx
mov dword [rsp + 0x44], r11d
movzx r8d, byte [rsp + 0x44]
mov byte [rsp + 0x39], r13b
mov byte [rsp + 0x2f], r8b
mov r8d, ebx
shr r8d, 0x18
mov byte [rsp + 0x32], dl
mov byte [rsp + 0x31], r8b
mov edi, r8d
movzx r8d, byte [rsp + 0x48]
mov byte [rsp + 0x34], r12b
mov byte [rsp + 0x3b], r8b
mov r8d, r9d
shr r8d, 0x10
mov byte [rsp + 0x2e], bl
mov r11d, r8d
mov ecx, r8d
mov r8d, r9d
mov byte [rsp + 0x30], bpl
shr r8d, 0x18
cmp dword [rsi + 0x11c], 1
mov byte [rsp + 0x3a], r9b
mov dword [rsp + 0x4c], r8d
movzx r8d, byte [rsp + 0x4c]
mov byte [rsp + 0x2d], r8b
je 0x1400337b3
mov byte [rsp + 0x39], al
movzx eax, byte [rsp + 0x3c]
mov byte [rsp + 0x37], r15b
movzx ecx, byte [rsp + 0x48]
mov byte [rsp + 0x34], al
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x38], r14b
mov byte [rsp + 0x32], al
movzx eax, byte [rsp + 0x44]
mov byte [rsp + 0x36], r13b
mov byte [rsp + 0x33], r12b
mov byte [rsp + 0x35], dl
mov byte [rsp + 0x2f], bpl
mov byte [rsp + 0x30], al
mov byte [rsp + 0x2e], dil
mov byte [rsp + 0x31], bl
mov byte [rsp + 0x3b], r11b
mov byte [rsp + 0x3a], r8b
mov byte [rsp + 0x2d], r9b
movzx eax, byte [rsp + 0x32]
movzx r8d, byte [rsp + 0x33]
movzx r9d, byte [rsp + 0x3b]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x34]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x35]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x36]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x37]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x38]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x39]
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x3a]
movq xmm0, rax
shl r8, 8
or r8, r9
movzx r9d, cl
mov rcx, r8
movzx r8d, byte [rsp + 0x2d]
shl rcx, 8
or rcx, r9
mov r9, r10
mov rdx, rcx
movzx ecx, byte [rsp + 0x2e]
shl rdx, 8
or rdx, r8
mov r8d, 0x10
shl rdx, 8
or rdx, rcx
movzx ecx, byte [rsp + 0x2f]
shl rdx, 8
or rdx, rcx
movzx ecx, byte [rsp + 0x30]
shl rdx, 8
or rdx, rcx
movzx ecx, byte [rsp + 0x31]
shl rdx, 8
or rdx, rcx
lea rcx, [rsp + 0x50]
movq xmm1, rdx
mov edx, 1
punpcklqdq xmm0, xmm1
movaps xmmword [rsp + 0x50], xmm0
call sym.fwrite
cmp rax, 0x10
jne 0x140033918
mov r9, qword [rsi]
mov rcx, qword [rsp + 0xb8]
mov r8, rbx
mov edx, 1
call sym.fwrite
cmp rbx, rax
je 0x140033904
mov rdi, qword [rsi + 0x128]
lea rbx, [rsi + 0x1c]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str._s:_lld:_could_not_write_packet_contents_n
mov r9, rdi
mov rcx, rax
call sym.fprintf_1
mov rcx, rbx
call sym.perror
mov rcx, qword [rsi]
call sym.fclose
mov qword [rsi], 0
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbp, qword [rsi + 0x128]
lea rdi, [rsi + 0x1c]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str._s:_lld:_could_not_write_packet_header_n
mov r9, rbp
mov rcx, rax
call sym.fprintf_1
mov rcx, rdi
call sym.perror
mov rcx, qword [rsi]
call sym.fclose
mov qword [rsi], 0
xor r9d, r9d
jmp 0x1400338a8