Function at 0x140031d50
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov eax, dword [rsp + 0xe0]
mov qword [rsp + 0xc8], rdx
mov rsi, rcx
mov edx, dword [rsp + 0xe8]
mov ebx, r8d
test rcx, rcx
je 0x140031ff4
mov r11, qword [rcx]
test r11, r11
je 0x140031ff4
mov ecx, edx
mov edi, edx
mov r10d, ebx
mov r8d, ebx
shr ecx, 0x18
shr edi, 8
mov r14d, eax
mov r15d, eax
mov dword [rsp + 0x4c], ecx
shr r10d, 8
shr r8d, 0x18
mov r13d, eax
mov byte [rsp + 0x42], cl
mov ecx, r9d
mov r12d, edx
mov ebp, ebx
shr ecx, 8
mov dword [rsp + 0x48], edi
shr r14d, 8
mov byte [rsp + 0x40], dil
shr r15d, 0x10
mov edi, r8d
shr r13d, 0x18
mov dword [rsp + 0x50], r10d
shr r12d, 0x10
shr ebp, 0x10
mov byte [rsp + 0x3c], r10b
movzx r10d, cl
mov byte [rsp + 0x3e], r8b
mov r8d, r9d
mov dword [rsp + 0x54], ecx
mov ecx, r9d
shr r8d, 0x18
shr ecx, 0x10
cmp dword [rsi + 0x11c], 1
mov byte [rsp + 0x43], al
mov byte [rsp + 0x44], r14b
mov byte [rsp + 0x45], r15b
mov byte [rsp + 0x46], r13b
mov byte [rsp + 0x3f], dl
mov byte [rsp + 0x41], r12b
mov byte [rsp + 0x3b], bl
mov byte [rsp + 0x3d], bpl
mov byte [rsp + 0x47], r9b
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x5c], r8d
mov byte [rsp + 0x20], r8b
je 0x140031ea7
mov byte [rsp + 0x46], al
movzx eax, byte [rsp + 0x48]
mov byte [rsp + 0x44], r15b
movzx r10d, byte [rsp + 0x58]
mov byte [rsp + 0x41], al
movzx eax, byte [rsp + 0x4c]
mov byte [rsp + 0x45], r14b
movzx ecx, byte [rsp + 0x54]
mov byte [rsp + 0x3f], al
movzx eax, byte [rsp + 0x50]
mov byte [rsp + 0x43], r13b
mov byte [rsp + 0x3d], al
movzx eax, byte [rsp + 0x5c]
mov byte [rsp + 0x40], r12b
mov byte [rsp + 0x42], dl
mov byte [rsp + 0x3c], bpl
mov byte [rsp + 0x3b], dil
mov byte [rsp + 0x3e], bl
mov byte [rsp + 0x47], al
mov byte [rsp + 0x20], r9b
movzx r9d, byte [rsp + 0x47]
movzx eax, byte [rsp + 0x3f]
movzx r8d, byte [rsp + 0x40]
shl r9, 8
shl rax, 8
or r9, r10
movzx r10d, cl
or rax, r8
movzx r8d, byte [rsp + 0x41]
mov rcx, r9
shl rax, 8
movzx r9d, byte [rsp + 0x20]
shl rcx, 8
or rax, r8
movzx r8d, byte [rsp + 0x42]
or rcx, r10
shl rax, 8
mov rdx, rcx
or rax, r8
movzx ecx, byte [rsp + 0x3b]
movzx r8d, byte [rsp + 0x43]
shl rdx, 8
shl rax, 8
or rdx, r9
or rax, r8
movzx r8d, byte [rsp + 0x44]
mov r9, r11
shl rdx, 8
shl rax, 8
or rdx, rcx
movzx ecx, byte [rsp + 0x3c]
or rax, r8
movzx r8d, byte [rsp + 0x45]
shl rdx, 8
shl rax, 8
or rdx, rcx
movzx ecx, byte [rsp + 0x3d]
or rax, r8
movzx r8d, byte [rsp + 0x46]
shl rdx, 8
shl rax, 8
or rdx, rcx
movzx ecx, byte [rsp + 0x3e]
or rax, r8
mov r8d, 0x10
shl rdx, 8
mov qword [rsp + 0x20], rax
or rdx, rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rdx
movdqu xmm0, xmmword [rsp + 0x20]
mov edx, 1
movups xmmword [rsp + 0x60], xmm0
call sym.fwrite
cmp rax, 0x10
jne 0x140032008
mov r9, qword [rsi]
mov rcx, qword [rsp + 0xc8]
mov r8, rbx
mov edx, 1
call sym.fwrite
cmp rbx, rax
je 0x140031ff4
mov rdi, qword [rsi + 0x128]
lea rbx, [rsi + 0x1c]
mov ecx, 2
call qword [dbg.__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_27
mov rcx, rbx
call sym.perror
mov rcx, qword [rsi]
call sym.fclose
mov qword [rsi], 0
add rsp, 0x78
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 [dbg.__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_27
mov rcx, rdi
call sym.perror
mov rcx, qword [rsi]
call sym.fclose
mov qword [rsi], 0
xor r9d, r9d
jmp 0x140031f98