Function at 0x140043090
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp byte [rdx + 0x10], 4
mov rbx, qword [rsp + 0xe0]
mov rdi, rcx
mov r12, rdx
mov r14, r9
je 0x140043420
mov dword [rsp + 0xa0], r8d
mov r13, qword [rsp + 0xd8]
mov r8d, dword [rcx + 0x34]
mov dword [rsp + 0x30], r8d
add r13, r8
cmp qword [rsp + 0xe8], r13
jae 0x140043120
mov ecx, 2
xor r13d, r13d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.tcp:_err_generating_packet:_too_much_payload_n
mov r9, rax
call sym.fwrite
mov rax, r13
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15, qword [rdx + 8]
mov r9, qword [r9 + 8]
mov rdx, qword [rcx + 0x38]
mov esi, dword [rcx + 0x2c]
mov ebp, dword [rcx + 0x30]
mov rcx, rbx
mov qword [rsp + 0x38], r9
call sym.memcpy
mov ecx, dword [rdi + 0x34]
mov r8, qword [rsp + 0xd8]
mov rdx, qword [rsp + 0xd0]
add rcx, rbx
call sym.memcpy
mov eax, dword [rdi + 0x34]
mov edx, dword [rdi + 0x2c]
mov r8d, 6
mov rcx, qword [rsp + 0xd8]
mov r9, qword [rsp + 0x38]
lea rax, [rcx + rax - 0x28]
sub rax, rdx
lea edx, [rsi + 4]
mov byte [rbx + rdx], ah
lea edx, [rsi + 5]
mov byte [rbx + rdx], al
mov rax, qword [r14]
lea edx, [rsi + 8]
mov rcx, rax
shr rcx, 0x38
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 9]
shr rcx, 0x30
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0xa]
shr rcx, 0x28
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0xb]
shr rcx, 0x20
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0xc]
shr rcx, 0x18
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0xd]
shr rcx, 0x10
mov byte [rbx + rdx], cl
lea edx, [rsi + 0xe]
mov rcx, r9
mov byte [rbx + rdx], ah
lea edx, [rsi + 0xf]
mov byte [rbx + rdx], al
mov rdx, r9
lea eax, [rsi + 0x10]
shr rdx, 0x38
mov byte [rbx + rax], dl
mov rdx, r9
lea eax, [rsi + 0x11]
shr rdx, 0x30
mov byte [rbx + rax], dl
mov rdx, r9
lea eax, [rsi + 0x12]
shr rdx, 0x28
mov byte [rbx + rax], dl
mov rdx, r9
lea eax, [rsi + 0x13]
shr rdx, 0x20
mov byte [rbx + rax], dl
mov rdx, r9
lea eax, [rsi + 0x14]
shr rdx, 0x18
mov byte [rbx + rax], dl
mov rdx, r9
lea eax, [rsi + 0x15]
shr rdx, 0x10
mov byte [rbx + rax], dl
lea eax, [rsi + 0x16]
lea edx, [rsi + 0x18]
mov byte [rbx + rax], ch
lea eax, [rsi + 0x17]
mov byte [rbx + rax], r9b
mov rax, qword [r12]
lea r12d, [rbp + 0x10]
mov rcx, rax
shr rcx, 0x38
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0x19]
shr rcx, 0x30
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0x1a]
shr rcx, 0x28
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0x1b]
shr rcx, 0x20
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0x1c]
shr rcx, 0x18
mov byte [rbx + rdx], cl
mov rcx, rax
lea edx, [rsi + 0x1d]
shr rcx, 0x10
mov byte [rbx + rdx], cl
lea edx, [rsi + 0x1e]
mov rcx, r15
mov byte [rbx + rdx], ah
lea edx, [rsi + 0x1f]
mov byte [rbx + rdx], al
mov rdx, r15
lea eax, [rsi + 0x20]
shr rdx, 0x38
mov byte [rbx + rax], dl
mov rdx, r15
lea eax, [rsi + 0x21]
mov r11d, dword [rsp + 0xa0]
shr rdx, 0x30
movzx edi, byte [rsp + 0xb0]
mov byte [rbx + rax], dl
mov rdx, r15
lea eax, [rsi + 0x22]
shr rdx, 0x28
mov byte [rbx + rax], dl
mov rdx, r15
lea eax, [rsi + 0x23]
shr rdx, 0x20
mov byte [rbx + rax], dl
mov rdx, r15
lea eax, [rsi + 0x24]
shr rdx, 0x18
mov byte [rbx + rax], dl
mov rdx, r15
lea eax, [rsi + 0x25]
shr rdx, 0x10
mov byte [rbx + rax], dl
lea eax, [rsi + 0x26]
mov byte [rbx + rax], ch
mov ecx, dword [rsp + 0xb0]
lea eax, [rsi + 0x27]
mov byte [rbx + rax], r15b
mov eax, ebp
mov byte [rbx + rax], ch
lea rdx, [rbx + rax]
lea eax, [rbp + 1]
mov ecx, r11d
mov byte [rbx + rax], dil
lea eax, [rbp + 2]
movzx edi, byte [rsp + 0xb8]
mov byte [rbx + rax], ch
mov ecx, dword [rsp + 0xb8]
lea eax, [rbp + 3]
mov byte [rbx + rax], r11b
lea eax, [rbp + 4]
shr ecx, 0x18
mov byte [rbx + rax], cl
mov ecx, dword [rsp + 0xb8]
lea eax, [rbp + 5]
shr ecx, 0x10
mov byte [rbx + rax], cl
mov ecx, dword [rsp + 0xb8]
lea eax, [rbp + 6]
mov byte [rbx + rax], ch
mov ecx, dword [rsp + 0xc0]
lea eax, [rbp + 7]
mov byte [rbx + rax], dil
lea eax, [rbp + 8]
movzx edi, byte [rsp + 0xc0]
shr ecx, 0x18
mov byte [rbx + rax], cl
mov ecx, dword [rsp + 0xc0]
lea eax, [rbp + 9]
shr ecx, 0x10
add r12, rbx
mov byte [rbx + rax], cl
mov ecx, dword [rsp + 0xc0]
lea eax, [rbp + 0xa]
mov byte [rbx + rax], ch
lea eax, [rbp + 0xb]
lea rcx, [rbx + rsi + 8]
mov byte [rbx + rax], dil
movzx edi, byte [rsp + 0xc8]
lea eax, [rbp + 0xd]
mov byte [rbx + rax], dil
lea eax, [rbp + 0xe]
lea edi, [rbp + 0x11]
mov byte [rbx + rax], 4
add rdi, rbx
mov r10d, dword [rsp + 0x30]
lea eax, [rbp + 0xf]
mov byte [rbx + rax], 0xb0
lea rax, [rbx + rsi + 0x18]
mov rsi, qword [rsp + 0xd8]
mov byte [r12], 0
sub r10d, ebp
mov byte [rdi], 0
lea r9, [r10 + rsi]
mov rsi, r12
mov qword [rsp + 0x20], rdx
mov rdx, rax
call dbg.checksum_ipv6
mov byte [rsi], ah
mov byte [rdi], al
jmp 0x140043109
mov esi, dword [rcx + 8]
mov rdx, qword [rcx + 0x10]
mov r13, qword [rsp + 0xd8]
lea eax, [rsi + 0xc]
movzx eax, byte [rdx + rax]
sar eax, 2
and eax, 0x3c
lea r15d, [rax + rsi]
mov rax, r15
add r13, r15
cmp qword [rsp + 0xe8], r13
jb 0x1400430e1
mov r12d, dword [r12]
mov ecx, dword [rsp + 0xb8]
mov dword [rsp + 0xa0], r8d
mov ebp, dword [rdi + 4]
xor ecx, r12d
xor ecx, r8d
mov r8d, dword [rdi]
sub eax, ebp
add rax, qword [rsp + 0xd8]
mov dword [rsp + 0x38], ecx
mov rcx, rbx
mov qword [rsp + 0x30], rax
call sym.memcpy
mov r8, qword [rsp + 0xd8]
lea rcx, [rbx + r15]
mov rdx, qword [rsp + 0xd0]
call sym.memcpy
lea edx, [rbp + 2]
lea eax, [rbp + 3]
mov r9, qword [rsp + 0x30]
add rdx, rbx
add rax, rbx
mov r10d, dword [rsp + 0x38]
movzx ecx, byte [rdx]
movzx r8d, byte [rax]
shl ecx, 8
or ecx, r8d
mov r11d, ecx
mov rcx, r9
mov byte [rdx], ch
mov ecx, r10d
lea edx, [rbp + 0xc]
mov byte [rax], r9b
lea eax, [rbp + 4]
mov byte [rbx + rax], ch
lea eax, [rbp + 5]
mov ecx, r12d
mov byte [rbx + rax], r10b
mov eax, dword [r14]
mov r8d, eax
shr r8d, 0x18
mov byte [rbx + rdx], r8b
mov r8d, eax
lea edx, [rbp + 0xd]
shr r8d, 0x10
mov byte [rbx + rdx], r8b
lea edx, [rbp + 0xe]
mov r8d, r12d
mov byte [rbx + rdx], ah
lea edx, [rbp + 0xf]
shr r8d, 0x18
mov byte [rbx + rdx], al
lea edx, [rbp + 0x10]
add rax, r12
mov byte [rbx + rdx], r8b
mov r8d, r12d
lea edx, [rbp + 0x11]
shr r8d, 0x10
mov byte [rbx + rdx], r8b
lea edx, [rbp + 0x12]
mov byte [rbx + rdx], ch
lea edx, [rbp + 0x13]
movsxd rcx, r11d
mov r11d, dword [rsp + 0xa0]
mov byte [rbx + rdx], r12b
movzx edx, r10w
add rdx, rax
mov eax, dword [rdi + 0x18]
add rdx, rax
sub rdx, rcx
mov ecx, dword [rsp + 0xb0]
add r9, rdx
mov rdx, r9
movzx r9d, r9w
shr rdx, 0x10
add rdx, r9
mov r9, r13
mov rax, rdx
movzx edx, dx
shr rax, 0x10
add rax, rdx
lea edx, [rbp + 0xa]
not rax
mov byte [rbx + rdx], ah
lea edx, [rbp + 0xb]
lea ebp, [rsi + 0x10]
mov byte [rbx + rdx], al
mov eax, esi
mov edx, dword [rsp + 0xb8]
add rbp, rbx
mov byte [rbx + rax], ch
movzx ecx, byte [rsp + 0xb0]
lea eax, [rsi + 1]
shr edx, 0x18
mov byte [rbx + rax], cl
lea eax, [rsi + 2]
mov ecx, r11d
mov byte [rbx + rax], ch
lea eax, [rsi + 3]
mov ecx, dword [rsp + 0xb8]
mov byte [rbx + rax], r11b
lea eax, [rsi + 4]
mov byte [rbx + rax], dl
mov edx, dword [rsp + 0xb8]
lea eax, [rsi + 5]
shr edx, 0x10
mov byte [rbx + rax], dl
lea eax, [rsi + 6]
mov byte [rbx + rax], ch
movzx ecx, byte [rsp + 0xb8]
lea eax, [rsi + 7]
mov edx, dword [rsp + 0xc0]
mov byte [rbx + rax], cl
lea eax, [rsi + 8]
mov ecx, dword [rsp + 0xc0]
shr edx, 0x18
mov byte [rbx + rax], dl
mov edx, dword [rsp + 0xc0]
lea eax, [rsi + 9]
shr edx, 0x10
mov byte [rbx + rax], dl
lea eax, [rsi + 0xa]
mov byte [rbx + rax], ch
movzx ecx, byte [rsp + 0xc0]
lea eax, [rsi + 0xb]
mov byte [rbx + rax], cl
movzx ecx, byte [rsp + 0xc8]
lea eax, [rsi + 0xd]
mov byte [rbx + rax], cl
lea eax, [rsi + 0xe]
mov rcx, rbx
mov byte [rbx + rax], 4
lea eax, [rsi + 0xf]
add esi, 0x11
add rsi, rbx
mov byte [rbx + rax], 0xb0
mov byte [rbp], 0
mov byte [rsi], 0
mov eax, dword [rdi + 8]
mov edx, dword [rdi + 4]
mov r8, rax
sub r9, rax
call dbg.tcp_checksum2
mov eax, eax
not rax
mov byte [rbp], ah
mov byte [rsi], al
cmp r13, 0x3b
ja 0x140043109
mov eax, 0x3c
xor r8d, r8d
sub rax, r13
add r13, rbx
cmp eax, 8
jae 0x1400436b0
test al, 4
jne 0x1400436ee
test eax, eax
je 0x1400436a5
mov byte [r13], 0
test al, 2
jne 0x140043703
mov r13d, 0x3c
jmp 0x140043109
mov edx, eax
mov qword [r13], 0
mov qword [r13 + rdx - 8], 0
lea rdx, [r13 + 8]
and rdx, 0xfffffffffffffff8
sub r13, rdx
add eax, r13d
and eax, 0xfffffff8
cmp eax, 8
jb 0x1400436a5
and eax, 0xfffffff8
xor ecx, ecx
mov r9d, ecx
add ecx, 8
mov qword [rdx + r9], r8
cmp ecx, eax
jb 0x1400436de
jmp 0x1400436a5
mov eax, eax
mov dword [r13], 0
mov dword [r13 + rax - 4], 0
jmp 0x1400436a5
mov eax, eax
xor edx, edx
mov word [r13 + rax - 2], dx
jmp 0x1400436a5