Function at 0x1400037d0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x38]
sub rsp, 0x110
mov r14, rcx
mov qword [rax + 0x10], rsi
xor r13d, r13d
mov qword [rax + 0x18], rdi
mov dword [rbp + 0x40], r13d
movzx ecx, byte [rcx + 0x31]
movsxd r10, edx
cmp byte [r14 + 0x30], r13b
je 0x140003a19
mov byte [r14 + 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 0x14000391a
mov byte [rbp - 0x70], r13b
cmp rax, r9
je 0x140003876
lea rdx, [rbp - 0x70]
nop word [rax + rax]
movzx eax, byte [r8]
movzx ecx, al
and cl, 0xf
or cl, 0x30
mov byte [rdx - 1], cl
cmp cl, 0x39
jbe 0x14000385b
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 0x14000386e
add al, 7
mov byte [rdx], al
inc r8
cmp r8, r9
jne 0x140003840
mov rax, qword [0x1400b5948]
mov ebx, reloc.WS2_32.dll_recv
mov qword [rsp + 0x38], rbx
test rax, rax
jne 0x1400038a4
xor r8d, r8d
lea ecx, [rbx - 0xf]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b5948], 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 rdi, rax
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
cmp rdi, rax
je 0x1400038fc
lea r8, [rbp - 0x80]
mov rcx, rdi
sub r8, rdi
mov edx, 2
nop dword [rax]
mov rax, qword [rcx + r8]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x1400038e0
lea rcx, [rdi + rbx]
movzx eax, byte [rcx + r8]
mov byte [rcx], al
lea r8, [rsp + 0x30]
mov rcx, r14
lea rdx, [rbp - 8]
call fcn.1400047c0
mov rcx, rax
mov ebx, listen
jmp 0x1400039fb
mov byte [rsp + 0x40], r13b
cmp rax, r9
je 0x140003966
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 0x14000394b
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 0x14000395e
add al, 7
mov byte [rdx], al
inc r8
cmp r8, r9
jne 0x140003930
mov rax, qword [0x1400b5948]
mov ebx, reloc.WS2_32.dll_recv
mov qword [rsp + 0x50], rbx
test rax, rax
jne 0x140003994
xor r8d, r8d
lea ecx, [rbx - 0xf]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b5948], 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 0x1400039ec
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 0x1400039d0
lea rcx, [r9 + rbx]
movzx eax, byte [rcx + r8]
mov byte [rcx], al
mov rdi, qword [rsp + 0x40]
lea rcx, [rsp + 0x48]
mov ebx, recv
mov rax, qword [rcx + 8]
mov rsi, qword [rsp + 0x40]
mov qword [rbp - 0x48], rax
mov rax, qword [rcx + 0x10]
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x50]
jmp 0x140003c7a
mov r8d, r10d
mov ebx, listen
neg r8d
mov r9d, ebx
test cl, cl
je 0x140003b4e
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 0x140003a40
test r10d, r10d
jns 0x140003a7a
dec r9
mov byte [rsp + r9 + 0x60], reloc.WLDAP32.dll_Ordinal_45
mov rax, qword [0x1400b5948]
lea rdi, [rsp + 0x60]
sub rbx, r9
add rdi, r9
mov qword [rsp + 0x38], rbx
test rax, rax
jne 0x140003aae
xor r8d, r8d
lea ecx, [rax + 1]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b5948], 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 rsi, rax
cmp rax, rdi
je 0x140003b30
test rbx, rbx
je 0x140003b30
mov rdx, rbx
mov r9, r13
shr rdx, 3
test rdx, rdx
je 0x140003b02
mov r8, rdi
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 0x140003af1
lea rax, [r9*8]
cmp rax, rbx
jae 0x140003b30
sub rdi, rsi
lea rcx, [rsi + rax]
sub rbx, rax
nop dword [rax]
movzx eax, byte [rdi + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rbx, 1
jne 0x140003b20
lea r8, [rsp + 0x30]
mov rcx, r14
lea rdx, [rbp - 0x20]
call fcn.140004670
mov rcx, rax
mov edx, 0xb0
jmp 0x140003c5f
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 0x140003b60
test r10d, r10d
jns 0x140003b9a
dec r9
mov byte [rsp + r9 + 0x70], reloc.WLDAP32.dll_Ordinal_45
mov rax, qword [0x1400b5948]
lea rdi, [rsp + 0x70]
sub rbx, r9
add rdi, r9
mov qword [rsp + 0x50], rbx
test rax, rax
jne 0x140003bce
xor r8d, r8d
lea ecx, [rax + 1]
mov edx, 0x100000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400b5948], 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, rdi
je 0x140003c50
test rbx, rbx
je 0x140003c50
mov rdx, rbx
mov r10, r13
shr rdx, 3
test rdx, rdx
je 0x140003c22
mov r8, rdi
mov rcx, rax
sub r8, rax
mov r10, rdx
mov rax, qword [rcx + r8]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x140003c11
lea rax, [r10*8]
cmp rax, rbx
jae 0x140003c50
sub rdi, r9
lea rcx, [r9 + rax]
sub rbx, rax
nop dword [rax]
movzx eax, byte [rdi + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rbx, 1
jne 0x140003c40
mov rsi, qword [rsp + 0x40]
lea rcx, [rsp + 0x48]
mov edx, 0xc0
mov rax, qword [rcx + 8]
mov ebx, edx
mov rdi, 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 0x140003cc2
mov r8, qword [rbp - 0x58]
btr ebx, 7
mov rcx, qword [0x1400b5948]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 0x40
je 0x140003cde
mov r8, qword [rsp + 0x58]
and ebx, 0xffffffbf
mov rcx, qword [0x1400b5948]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 0x20
je 0x140003cf9
mov r8, qword [rbp - 0x10]
and ebx, 0xffffffdf
mov rcx, qword [0x1400b5948]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 0x10
je 0x140003d13
mov rcx, qword [0x1400b5948]
and ebx, 0xffffffef
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rsi, qword [rsp + 0x148]
test bl, 8
je 0x140003d36
mov r8, qword [rbp - 0x40]
and ebx, 0xfffffff7
mov rcx, qword [0x1400b5948]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 4
je 0x140003d4f
mov r8, qword [rsp + 0x58]
xor edx, edx
mov rcx, qword [0x1400b5948]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 2
je 0x140003d67
mov r8, qword [rbp + 8]
xor edx, edx
mov rcx, qword [0x1400b5948]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test bl, 1
je 0x140003d7e
mov rcx, qword [0x1400b5948]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdi, qword [rsp + 0x150]
cmp byte [r14 + 0x40], r13b
je 0x140003d9d
lea rdx, [rbp - 0x38]
mov rcx, r14
call fcn.14000f9e0
jmp 0x140003e3e
mov rax, qword [r14 + 0x18]
cmp rax, 1
jne 0x140003dcf
mov rcx, qword [r14]
lea r9, [0x1400b5958]
mov r8d, r15d
mov qword [rsp + 0x20], r13
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, r15
mov rcx, r14
call fcn.140004900
jmp 0x140003e3e
mov rcx, r14
test rax, rax
jne 0x140003dfc
mov rdx, r15
call fcn.140004900
mov rcx, qword [r14]
lea r9, [0x1400b5958]
mov r8d, r15d
mov qword [rsp + 0x20], r13
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140003e3e
mov rbx, qword [r14 + 0x10]
xor r8d, r8d
shr rbx, 1
mov rdx, rbx
call fcn.140004b20
mov rcx, qword [r14]
lea r9, [0x1400b5958]
mov r8d, r15d
mov qword [rsp + 0x20], r13
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [r14 + 0x10]
mov r8b, 1
and edx, 1
mov rcx, r14
add rdx, rbx
call fcn.140004b20
mov rcx, qword [0x1400b5948]
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x158]
mov rax, r14
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rbp
ret