Function at 0x140045f40
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
lea rsi, [0x140072128]
lea rdi, [0x140071f75]
xor ebp, ebp
lea r15, [0x1400559e0]
lea r14, [rsp + 0x80]
lea r12, [rsp + 0xa0]
mov qword [rsp + 0x68], 0x56
mov qword [rsp + 0x30], r14
mov r8d, ebp
lea rdx, str.___templ_tcp_hdr:_run__u_n
mov ecx, 1
mov qword [rsp + 0x78], 0x56
mov dword [rsp + 0x44], ebp
call dbg.LOG
mov ecx, 0x56
call sym.malloc
movdqa xmm0, xmmword [r15]
mov r13, qword [rsi]
mov qword [rsp + 0xa0], 0
movdqa xmm1, xmmword [0x1400559f0]
mov r14, rax
mov qword [rsp + 0x70], rax
movdqa xmm2, xmmword [0x140055a00]
movdqa xmm3, xmmword [0x140055a10]
movups xmmword [rax], xmm0
movdqa xmm4, xmmword [0x140055a20]
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax + 0x20], xmm2
movups xmmword [rax + 0x30], xmm3
movups xmmword [rax + 0x40], xmm4
mov rax, qword [0x140055a2e]
mov qword [rsp + 0xa8], 0
mov qword [r14 + 0x4e], rax
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0xb8], 0
mov qword [rsp + 0xc0], 0
cmp r13, 0x28
ja 0x1400463d0
mov r8, r13
mov rdx, rdi
mov rcx, r12
call sym.memcpy
test r13b, 3
je 0x14004606a
nop dword [rax + rax]
add r13, 1
test r13b, 3
jne 0x140046060
mov rcx, qword [rsp + 0x30]
mov r8d, 0x56
mov rdx, r14
call dbg._find_tcp_header
cmp byte [rsp + 0x99], 0
je 0x1400463d0
mov rax, qword [rsp + 0x80]
mov r9, qword [rsp + 0x88]
mov edi, r13d
lea r10, [rax + 0x14]
mov qword [rsp + 0x38], rax
mov rax, r9
sub rax, r10
sub edi, eax
test edi, edi
jg 0x140046410
mov ebx, 0x56
je 0x1400460f9
sub rbx, r9
movsxd rax, edi
mov rcx, r14
mov edx, 0x56
mov qword [rsp + 0x20], rbx
mov rbx, rax
lea r8, [r9 + rax]
add rbx, 0x56
mov qword [rsp + 0x48], r10
call dbg.safe_memmove
mov rcx, r14
mov rdx, rbx
call sym.realloc
mov r10, qword [rsp + 0x48]
mov r14, rax
lea rcx, [r14 + r10]
mov r8, r13
mov rdx, r12
call sym.memcpy
mov r9, qword [rsp + 0x38]
mov rdx, rbx
mov rcx, r14
movzx eax, byte [rsp + 0x98]
mov r8d, edi
mov byte [rsp + 0x28], al
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
call sym._adjust_length.isra.0
mov rdx, rbx
mov rcx, r14
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], rbx
call sym._consistancy_check.constprop.0
test eax, eax
jne 0x1400463d0
mov eax, dword [rsi + 8]
cmp eax, 2
je 0x140046468
cmp eax, 3
je 0x1400463a0
cmp eax, 1
jne 0x1400463f2
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call dbg._normalize_padding
test al, al
je 0x1400463d0
mov rdi, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov rdx, rdi
mov rcx, rbx
call sym._consistancy_check.constprop.0
test eax, eax
jne 0x1400463d0
mov rcx, qword [rsp + 0x30]
mov r8, rdi
mov rdx, rbx
call dbg._find_tcp_header
cmp byte [rsp + 0x99], 0
mov r8, qword [rsp + 0x88]
je 0x1400463d0
mov rax, qword [rsp + 0x80]
lea rdx, [rax + 0x14]
sub r8, rdx
cmp r8, qword [rsi + 0x28]
jne 0x1400463d0
mov rcx, qword [rsi + 0x20]
add rdx, rbx
call sym.memcmp
test eax, eax
jne 0x1400464b5
mov rcx, rbx
add rsi, 0x38
add rbp, 1
call sym.free
mov rdi, qword [rsi - 8]
test rdi, rdi
jne 0x140045f88
mov ecx, 0x56
mov r14, qword [rsp + 0x30]
call sym.malloc
movdqa xmm5, xmmword [0x140055a40]
mov edx, 0x56
mov rbx, rax
mov qword [rsp + 0x80], rax
movups xmmword [rax], xmm5
movdqa xmm5, xmmword [0x140055a50]
mov rcx, rbx
movups xmmword [rax + 0x10], xmm5
movdqa xmm5, xmmword [0x140055a60]
movups xmmword [rax + 0x20], xmm5
movdqa xmm5, xmmword [0x140055a70]
movups xmmword [rax + 0x30], xmm5
movdqa xmm5, xmmword [0x140055a80]
movups xmmword [rax + 0x40], xmm5
mov rax, qword [str.DeadBeef]
mov qword [rbx + 0x4e], rax
call sym._consistancy_check.constprop.0
test eax, eax
jne 0x140046390
mov r9d, 2
mov r8d, 0x56
mov rdx, rbx
mov rcx, r12
call sym.tcp_find_opt
cmp byte [rsp + 0xb4], 0
je 0x140046390
cmp qword [rsp + 0xa8], 2
jne 0x140046390
mov rax, qword [rsp + 0xa0]
cmp word [rax], 0xb405
jne 0x140046390
mov r9d, 3
mov r8d, 0x56
mov rdx, rbx
mov rcx, r12
call sym.tcp_find_opt
cmp byte [rsp + 0xb4], 0
je 0x140046390
cmp qword [rsp + 0xa8], 1
jne 0x140046390
mov rax, qword [rsp + 0xa0]
cmp byte [rax], 6
jne 0x140046390
mov r9d, 3
mov r8d, 0x56
mov rdx, rbx
mov rcx, r12
call sym.tcp_find_opt
cmp byte [rsp + 0xb4], 0
je 0x140046390
cmp qword [rsp + 0xa8], 1
jne 0x140046390
lea rax, [0x140072009]
lea rsi, [rsp + 0x68]
mov rcx, r14
mov r9d, 2
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov r8d, 2
call dbg.tcp_add_opt
mov rdi, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x80]
mov rdx, rdi
mov rcx, rbx
call sym.tcp_get_mss.constprop.0
cmp eax, 0x1234
je 0x1400466f0
nop dword [rax + rax]
mov rcx, rbx
call sym.free
jmp 0x1400463f2
cmp qword [rsi + 0x18], 1
mov rax, qword [rsi + 0x10]
jne 0x1400463d0
movzx r8d, byte [rax]
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call dbg.tcp_remove_opt
test al, al
jne 0x140046186
nop word cs:[rax + rax]
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rsi
mov r8d, dword [rsp + 0x44]
lea rdx, str.____templ.tcp.selftest_failed__test__u_n
mov rcx, rax
call sym.fprintf_1
mov eax, 1
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, edi
mov rcx, r14
mov qword [rsp + 0x58], r10
lea rbx, [r8 + 0x56]
mov qword [rsp + 0x50], r9
mov rdx, rbx
mov qword [rsp + 0x48], r8
call sym.realloc
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x48]
mov rdx, rbx
mov r14, rax
mov eax, 0x56
sub rax, r9
add r8, r9
mov rcx, r14
mov qword [rsp + 0x20], rax
call dbg.safe_memmove
mov r10, qword [rsp + 0x58]
jmp 0x1400460f9
mov rcx, qword [rsi + 0x18]
mov rax, qword [rsi + 0x10]
cmp rcx, 1
jbe 0x1400463d0
movzx r9d, byte [rax + 1]
movzx r8d, byte [rax]
add rax, 2
cmp rcx, r9
jne 0x1400463d0
mov qword [rsp + 0x20], rax
sub r9d, 2
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call dbg.tcp_add_opt
test al, al
jne 0x140046186
jmp 0x1400463d0
mov r8, rdi
mov rdx, rbx
mov rcx, r12
call dbg._find_tcp_header
cmp byte [rsp + 0xb9], 0
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
je 0x1400466ca
lea rdx, str.____failed_expectations
mov rax, qword [rsp + 0xa0]
lea rcx, str._s:_n
xor ebp, ebp
lea rdi, [rbx + rax + 0x14]
mov rbx, qword [rsp + 0xa8]
lea r15, [rbx - 0xc]
mov rbx, r15
sub rbx, rax
mov qword [rsp + 0x38], rbx
call sym.printf
mov r14, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
mov qword [rsp + 0x30], 0
test rbx, rbx
je 0x1400463d7
mov qword [rsp + 0x48], rsi
nop
mov rax, qword [rsp + 0x38]
mov rbx, rbp
add rbp, 0x10
cmp rax, rbp
mov rsi, rax
cmova rsi, rbp
cmp qword [rsp + 0x30], rsi
jae 0x14004669d
xor r12d, r12d
mov r8d, 0x3e
test rbx, rbx
jne 0x140046695
nop word cs:[rax + rax]
nop
add r12, 1
lea rcx, str._02x_c
movzx edx, byte [rdi + r12 - 1]
call sym.printf
cmp r12, rsi
jae 0x140046598
mov r8d, 0x20
jmp 0x140046570
mov r13, rsi
cmp qword [rsp + 0x38], rbp
jae 0x1400466b9
lea r12, [0x140071fd9]
nop dword [rax]
mov rcx, r12
add r13, 1
call sym.printf
cmp r13, rbp
jb 0x1400465b0
lea rcx, [0x140071fd6]
call sym.printf
cmp qword [rsp + 0x30], rsi
jae 0x140046660
test rbx, rbx
jne 0x140046688
mov r15d, 0x23
mov r12, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isprint]
mov r13d, 0x23
mov ecx, r15d
call r12
test eax, eax
je 0x140046610
mov ecx, r15d
call r14
test eax, eax
je 0x140046643
nop dword [rax + rax]
mov ecx, 0x2e
add rbx, 1
call sym.putchar
cmp rbx, rsi
je 0x140046660
movzx ecx, byte [rdi + rbx]
movzx r15d, cl
movsx r13d, cl
mov ecx, r15d
call r12
test eax, eax
je 0x140046610
mov ecx, r15d
call r14
test eax, eax
jne 0x140046610
mov ecx, r13d
add rbx, 1
call sym.putchar
cmp rbx, rsi
jne 0x140046623
nop word cs:[rax + rax]
nop
mov ecx, 0xa
call sym.putchar
mov rax, qword [rsp + 0x38]
add qword [rsp + 0x30], 0x10
cmp rbp, rax
jb 0x140046530
mov rsi, qword [rsp + 0x48]
jmp 0x1400463d7
movzx ecx, byte [rdi + rbx]
mov r12, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isprint]
jmp 0x140046627
mov r12, rbx
jmp 0x14004658b
mov r13, rbx
cmp qword [rsp + 0x30], rbp
jb 0x1400465a6
lea rcx, [0x140071fd6]
call sym.printf
jmp 0x140046660
lea rcx, [0x140071fd6]
call sym.printf
jmp 0x1400465d8
mov ecx, 2
call rsi
mov r8d, 0x1b
mov edx, 1
lea rcx, str.____templ.tcp.hdr:_failure_n
mov r9, rax
call sym.fwrite
jmp 0x1400464d8
mov rdx, rdi
mov rcx, rbx
call sym._consistancy_check.constprop.0
test eax, eax
jne 0x140046390
mov rdx, rsi
mov rcx, r14
mov r8d, 3
call dbg.tcp_remove_opt
mov rsi, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x80]
mov rdx, rsi
mov rcx, rbx
call sym.tcp_get_mss.constprop.0
cmp eax, 0x1234
jne 0x140046390
mov r8, rsi
mov rdx, rbx
mov rcx, r12
call dbg._find_tcp_header
cmp byte [rsp + 0xb9], 0
je 0x140046782
xor eax, eax
mov r9d, 3
mov rcx, rbx
mov rdi, qword [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov rdx, qword [rsp + 0xa0]
mov r8, rdi
call sym._find_opt.isra.0
cmp rax, rdi
jae 0x140046782
cmp byte [rbx + rax], 3
je 0x1400467aa
mov rdx, rsi
mov rcx, rbx
call sym._consistancy_check.constprop.0
test eax, eax
jne 0x140046390
mov rcx, rbx
mov dword [rsp + 0x30], eax
call sym.free
mov eax, dword [rsp + 0x30]
jmp 0x1400463f7
movzx edx, byte [rbx + rax + 1]
sub edx, 2
movsxd rdx, edx
add rax, rdx
cmp rax, rdi
jae 0x140046782
sub rdx, 1
je 0x140046390
jmp 0x140046782