Function at 0x140003870
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rbp
push rdi
push r12
push r13
push r15
lea rbp, [rax - 0x38]
sub rsp, 0x110
mov rdi, rcx
mov qword [rax + 0x10], rsi
xor r13d, r13d
mov qword [rax + 0x18], r14
mov dword [rbp + 0x40], r13d
movzx ecx, byte [rcx + 0x31]
movsxd r10, edx
cmp byte [rdi + 0x30], r13b
je 0x140003ab9
mov byte [rdi + 0x30], r13b
mov rax, r10
mov qword [rbp + 0x40], rax
lea rax, [rbp + 0x40]
lea r9, [rbp + 0x48]
lea r8, [rbp + 0x40]
test cl, cl
je 0x1400039ba
mov byte [rbp - 0x70], r13b
cmp rax, r9
je 0x140003916
lea rdx, [rbp - 0x70]
nop dword [rax]
movzx eax, byte [r8]
movzx ecx, al
and cl, 0xf
or cl, 0x30
mov byte [rdx - 1], cl
cmp cl, 0x39
jbe 0x1400038fb
add cl, 7
mov byte [rdx - 1], cl
sub rdx, 2
shr al, 4
or al, 0x30
mov byte [rdx], al
cmp al, 0x39
jbe 0x14000390e
add al, 7
mov byte [rdx], al
inc r8
cmp r8, r9
jne 0x1400038e0
mov rax, qword [0x1400b7960]
mov ebx, reloc.WS2_32.dll_recv
mov qword [rsp + 0x38], rbx
test rax, rax
jne 0x140003944
xor r8d, r8d
lea ecx, [rbx - 0xf]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b7960], rax
xor edx, edx
mov qword [rsp + 0x30], reloc.WS2_32.dll_recvfrom
mov rcx, rax
lea r8d, [rdx + 0x11]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
cmp rsi, rax
je 0x14000399c
lea r8, [rbp - 0x80]
mov rcx, rsi
sub r8, rsi
mov edx, 2
nop dword [rax]
mov rax, qword [rcx + r8]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x140003980
lea rcx, [rsi + rbx]
movzx eax, byte [rcx + r8]
mov byte [rcx], al
lea r8, [rsp + 0x30]
mov rcx, rdi
lea rdx, [rbp - 8]
call fcn.1400048f0
mov rcx, rax
mov ebx, listen
jmp 0x140003a9b
mov byte [rsp + 0x40], r13b
cmp rax, r9
je 0x140003a06
lea rdx, [rsp + 0x40]
nop dword [rax]
movzx eax, byte [r8]
movzx ecx, al
and cl, 0xf
or cl, 0x30
mov byte [rdx - 1], cl
cmp cl, 0x39
jbe 0x1400039eb
add cl, 7
mov byte [rdx - 1], cl
sub rdx, 2
shr al, 4
or al, 0x30
mov byte [rdx], al
cmp al, 0x39
jbe 0x1400039fe
add al, 7
mov byte [rdx], al
inc r8
cmp r8, r9
jne 0x1400039d0
mov rax, qword [0x1400b7960]
mov ebx, reloc.WS2_32.dll_recv
mov qword [rsp + 0x50], rbx
test rax, rax
jne 0x140003a34
xor r8d, r8d
lea ecx, [rbx - 0xf]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b7960], rax
xor edx, edx
mov qword [rsp + 0x48], reloc.WS2_32.dll_recvfrom
mov rcx, rax
lea r8d, [rdx + 0x11]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r9, rax
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x30]
cmp r9, rax
je 0x140003a8c
lea r8, [rsp + 0x30]
mov rcx, r9
sub r8, r9
mov edx, 2
nop
mov rax, qword [rcx + r8]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x140003a70
lea rcx, [r9 + rbx]
movzx eax, byte [rcx + r8]
mov byte [rcx], al
mov rsi, qword [rsp + 0x40]
lea rcx, [rsp + 0x48]
mov ebx, recv
mov rax, qword [rcx + 8]
mov r14, qword [rsp + 0x40]
mov qword [rbp - 0x48], rax
mov rax, qword [rcx + 0x10]
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x50]
jmp 0x140003d1a
mov r8d, r10d
mov ebx, listen
neg r8d
mov r9d, ebx
test cl, cl
je 0x140003bee
test edx, edx
mov byte [rsp + 0x6b], r13b
cmovns r8d, r10d
nop word [rax + rax]
dec r9
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
or r8b, 0x30
mov byte [rsp + r9 + 0x60], r8b
mov r8d, edx
test edx, edx
jne 0x140003ae0
test r10d, r10d
jns 0x140003b1a
dec r9
mov byte [rsp + r9 + 0x60], reloc.WLDAP32.dll_Ordinal_45
mov rax, qword [0x1400b7960]
lea rsi, [rsp + 0x60]
sub rbx, r9
add rsi, r9
mov qword [rsp + 0x38], rbx
test rax, rax
jne 0x140003b4e
xor r8d, r8d
lea ecx, [rax + 1]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b7960], rax
inc rbx
xor edx, edx
mov r8, rbx
mov qword [rsp + 0x30], rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x40], rax
mov r14, rax
cmp rax, rsi
je 0x140003bd0
test rbx, rbx
je 0x140003bd0
mov rdx, rbx
mov r9, r13
shr rdx, 3
test rdx, rdx
je 0x140003ba2
mov r8, rsi
mov rcx, rax
sub r8, rax
mov r9, rdx
mov rax, qword [rcx + r8]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x140003b91
lea rax, [r9*8]
cmp rax, rbx
jae 0x140003bd0
sub rsi, r14
lea rcx, [r14 + rax]
sub rbx, rax
nop dword [rax]
movzx eax, byte [rsi + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rbx, 1
jne 0x140003bc0
lea r8, [rsp + 0x30]
mov rcx, rdi
lea rdx, [rbp - 0x20]
call fcn.1400047a0
mov rcx, rax
mov edx, 0xb0
jmp 0x140003cff
test edx, edx
mov byte [rsp + 0x7b], r13b
cmovns r8d, r10d
nop dword [rax]
dec r9
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
or r8b, 0x30
mov byte [rsp + r9 + 0x70], r8b
mov r8d, edx
test edx, edx
jne 0x140003c00
test r10d, r10d
jns 0x140003c3a
dec r9
mov byte [rsp + r9 + 0x70], reloc.WLDAP32.dll_Ordinal_45
mov rax, qword [0x1400b7960]
lea rsi, [rsp + 0x70]
sub rbx, r9
add rsi, r9
mov qword [rsp + 0x50], rbx
test rax, rax
jne 0x140003c6e
xor r8d, r8d
lea ecx, [rax + 1]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b7960], rax
inc rbx
xor edx, edx
mov r8, rbx
mov qword [rsp + 0x48], rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x58], rax
mov r9, rax
cmp rax, rsi
je 0x140003cf0
test rbx, rbx
je 0x140003cf0
mov rdx, rbx
mov r10, r13
shr rdx, 3
test rdx, rdx
je 0x140003cc2
mov r8, rsi
mov rcx, rax
sub r8, rax
mov r10, rdx
mov rax, qword [r8 + rcx]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x140003cb1
lea rax, [r10*8]
cmp rax, rbx
jae 0x140003cf0
sub rsi, r9
lea rcx, [r9 + rax]
sub rbx, rax
nop dword [rax]
movzx eax, byte [rsi + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rbx, 1
jne 0x140003ce0
mov r14, qword [rsp + 0x40]
lea rcx, [rsp + 0x48]
mov edx, 0xc0
mov rax, qword [rcx + 8]
mov ebx, edx
mov rsi, qword [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov rax, qword [rcx + 0x10]
mov qword [rbp - 0x58], rax
lea rax, [rbp - 0x68]
mov r8, qword [rcx]
mov r15, qword [rax + 8]
mov r12, qword [rax + 0x10]
mov qword [rcx + 0x10], r13
mov qword [rcx + 8], r13
mov qword [rcx], r13
mov qword [rbp - 0x38], r8
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x28], r12
mov qword [rax], r13
mov qword [rax + 8], r13
mov qword [rax + 0x10], r13
test bl, bl
jns 0x140003d62
mov r8, qword [rbp - 0x58]
btr ebx, 7
mov rcx, qword [0x1400b7960]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 0x40
je 0x140003d7e
mov r8, qword [rsp + 0x58]
and ebx, 0xffffffbf
mov rcx, qword [0x1400b7960]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 0x20
je 0x140003d99
mov r8, qword [rbp - 0x10]
and ebx, 0xffffffdf
mov rcx, qword [0x1400b7960]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 0x10
je 0x140003db3
mov rcx, qword [0x1400b7960]
and ebx, 0xffffffef
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r14, qword [rsp + 0x150]
test bl, 8
je 0x140003dd6
mov r8, qword [rbp - 0x40]
and ebx, 0xfffffff7
mov rcx, qword [0x1400b7960]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 4
je 0x140003def
mov r8, qword [rsp + 0x58]
xor edx, edx
mov rcx, qword [0x1400b7960]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 2
je 0x140003e07
mov r8, qword [rbp + 8]
xor edx, edx
mov rcx, qword [0x1400b7960]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 1
je 0x140003e1e
mov rcx, qword [0x1400b7960]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rsi, qword [rsp + 0x148]
cmp byte [rdi + 0x40], r13b
je 0x140003e3d
lea rdx, [rbp - 0x38]
mov rcx, rdi
call fcn.140011c30
jmp 0x140003efb
mov rax, qword [rdi + 0x18]
cmp rax, 1
jne 0x140003e6f
mov rcx, qword [rdi]
lea r9, [0x1400b7970]
mov r8d, r15d
mov qword [rsp + 0x20], r13
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r15
mov rcx, rdi
call fcn.140004a30
jmp 0x140003edd
mov rcx, rdi
test rax, rax
jne 0x140003e9c
mov rdx, r15
call fcn.140004a30
mov rcx, qword [rdi]
lea r9, [0x1400b7970]
mov r8d, r15d
mov qword [rsp + 0x20], r13
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140003edd
mov rbx, qword [rdi + 0x10]
xor r8d, r8d
shr rbx, 1
mov rdx, rbx
call fcn.140004c50
mov rcx, qword [rdi]
lea r9, [0x1400b7970]
mov r8d, r15d
mov qword [rsp + 0x20], r13
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [rdi + 0x10]
mov r8b, 1
and edx, 1
mov rcx, rdi
add rdx, rbx
call fcn.140004c50
cmp dword [rdi + 0x4c], r13d
je 0x140003efb
movzx edx, word [0x1400b7a08]
mov rcx, qword [rdi]
mov word [rdi + 0x42], dx
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov dword [rdi + 0x4c], r13d
mov rcx, qword [0x1400b7960]
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x158]
mov rax, rdi
add rsp, 0x110
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret