Function at 0x1800393e0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
lea rbp, [rsp - 0x2c0]
mov eax, 0x3c0
call fcn.18017e6d0
sub rsp, rax
mov rax, qword [0x1802658e0]
xor rax, rsp
mov qword [rbp + 0x290], rax
mov rax, qword [rbp + 0x310]
mov rbx, qword [rbp + 0x320]
mov r13d, 0x28
mov qword [rsp + 0x68], rax
mov rax, qword [rbp + 0x328]
mov qword [rsp + 0x58], r9
mov rsi, r8
mov qword [rbp - 0x58], r8
mov qword [rbp - 0x68], rdx
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x48], rcx
mov edi, 0x40
mov qword [rbp - 0x80], r13
mov qword [rsp + 0x50], 8
mov byte [rsp + 0x20], 1
cmp rbx, 0x100000
jb 0x18003946c
xor eax, eax
jmp 0x180039bcd
mov qword [rsp + 0x3b0], r14
mov qword [rsp + 0x3a8], r15
call fcn.180056990
mov rcx, rax
call fcn.1800b5000
mov r11d, eax
cmp eax, 0x2a1
jg 0x18003955b
je 0x180039546
cmp eax, 4
je 0x18003950d
cmp eax, edi
je 0x1800394df
cmp eax, 0x2a0
jne 0x180039569
lea rcx, [rbp - 0x20]
call fcn.180079d50
test eax, eax
jle 0x180039574
mov r15d, 0x20
lea rax, [0x180039260]
lea r14, [0x18007afd0]
lea r11d, [r15 - 0x18]
jmp 0x1800395cf
lea rcx, [rbp - 0x20]
call fcn.18007c010
test eax, eax
jle 0x180039574
mov r15d, reloc.WS2_32.dll_sendto
lea rax, [0x1800391d0]
lea r14, [0x18007d510]
lea r11d, [r15 - 0xc]
jmp 0x1800395cf
lea rcx, [rbp - 0x20]
call fcn.180114a00
test eax, eax
jle 0x180039574
mov r15d, reloc.WS2_32.dll_recv
mov r13d, 0x30
lea rax, [0x180039150]
lea r14, [0x18007be90]
mov byte [rsp + 0x20], 0
lea r11d, [r15 - 8]
mov qword [rbp - 0x80], r13
jmp 0x1800395cf
lea rcx, [rbp - 0x20]
call fcn.180077510
test eax, eax
jle 0x180039574
mov r15d, 0x30
jmp 0x1800395b2
sub r11d, 0x2a2
je 0x1800395a2
dec r11d
je 0x18003957b
test rsi, rsi
je 0x180039574
xor r13d, r13d
mov qword [rsi], r13
xor eax, eax
jmp 0x180039bbd
lea rcx, [rbp - 0x20]
call fcn.180079ce0
test eax, eax
jle 0x180039574
mov r15d, 0x1c
lea rax, [0x180039260]
lea r14, [0x18007afd0]
lea r11d, [r15 - 0x14]
jmp 0x1800395cf
lea rcx, [rbp - 0x20]
call fcn.1800775a0
test eax, eax
jle 0x180039574
mov r15, rdi
mov r11d, reloc.WS2_32.dll_recv
lea r14, [0x180079bb0]
lea rax, [0x180039340]
lea edi, [r11 + 0x70]
mov qword [rsp + 0x50], r11
cmp byte [rbp + 0x338], 0
mov qword [rsp + 0x3b8], r12
mov qword [rsp + 0x40], r15
mov r12d, reloc.WS2_32.dll_listen
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x48], rax
je 0x180039609
mov rax, qword [rbp + 0x330]
mov r9d, 2
lea r12, [r13 + rax + 0xb]
jmp 0x18003961a
lea rax, [r15 + rdi + 0xff]
xor edx, edx
div rdi
lea r9, [rax + 1]
xor edx, edx
mov r8, r12
xor r13d, r13d
sub r8, r15
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x60], r13
lea rcx, [r8 + r11]
add rcx, rdi
lea rax, [rcx + rbx - 1]
mov rcx, qword [rbp + 0x318]
mov ebx, r13d
div rdi
lea rsi, [r8 + rcx]
xor edx, edx
mov r10, rax
mov rax, rsi
mov ecx, r13d
div rdi
mov qword [rbp - 0x70], rax
mov qword [rsp + 0x78], rdx
xor edx, edx
lea rax, [rsi + r11]
div rdi
mov qword [rbp - 0x60], rax
movzx eax, byte [rbp + 0x338]
test al, al
setne cl
add rcx, r9
cmp r10, rcx
jbe 0x180039693
mov rbx, r10
sub rbx, r9
mov qword [rsp + 0x60], rbx
imul rbx, rdi
shl rsi, 3
test al, al
jne 0x180039704
lea rcx, [rbp + 0x110]
mov r8, rdi
xor edx, edx
lea rsi, [rsi + rdi*8]
call fcn.18017e8a0
mov rax, qword [rbp + 0x330]
cmp rax, 0x80
ja 0x180039bb3
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp + 0x110]
mov r8, rax
call fcn.18017dd20
mov r11, r13
test rdi, rdi
je 0x1800396f1
nop
xor byte [rbp + r11 + 0x110], 0x36
inc r11
cmp r11, rdi
jb 0x1800396e0
lea rdx, [rbp + 0x110]
lea rcx, [rbp - 0x20]
call r14
mov r11, qword [rsp + 0x50]
xor edx, edx
lea rcx, [rbp + 0xc0]
cmp byte [rsp + 0x20], r13b
je 0x180039756
lea r8, [r11 - 4]
call fcn.18017e8a0
mov rcx, qword [rsp + 0x50]
mov rax, rsi
shr rax, 0x18
mov byte [rbp + rcx + 0xbf], sil
mov byte [rbp + rcx + 0xbc], al
mov rax, rsi
shr rax, 0x10
mov byte [rbp + rcx + 0xbd], al
mov rax, rsi
shr rax, 8
mov byte [rbp + rcx + 0xbe], al
jmp 0x180039795
mov r8, r11
call fcn.18017e8a0
mov rcx, qword [rsp + 0x50]
mov rax, rsi
shr rax, 0x18
mov byte [rbp + rcx + 0xb8], sil
mov byte [rbp + rcx + 0xbb], al
mov rax, rsi
shr rax, 0x10
mov byte [rbp + rcx + 0xba], al
mov rax, rsi
shr rax, 8
mov byte [rbp + rcx + 0xb9], al
test rbx, rbx
je 0x1800398c5
cmp byte [rbp + 0x338], r13b
je 0x180039844
cmp r12, rdi
jbe 0x180039bb3
mov rdx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x28]
lea rcx, [rbp - 0x20]
mov r14, r12
sub r14, rdi
call rsi
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp + 0x190]
mov r8, r14
add rdx, rdi
call fcn.18017dd20
mov rdx, qword [rsp + 0x68]
mov r8, rdi
lea rcx, [rbp + r14 + 0x190]
sub r8, r14
call fcn.18017dd20
lea rdx, [rbp + 0x190]
lea rcx, [rbp - 0x20]
call rsi
xor edx, edx
mov rax, rbx
div rdi
dec rax
cmp rax, 1
jbe 0x1800398c5
mov rsi, qword [rsp + 0x68]
mov r13, qword [rsp + 0x28]
sub rsi, r14
lea r14, [rax - 1]
add rsi, rdi
nop
lea rcx, [rbp - 0x20]
mov rdx, rsi
call r13
add rsi, rdi
dec r14
jne 0x180039830
jmp 0x1800398c2
mov rcx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
lea r8, [rdi - 0xd]
mov rax, qword [rcx]
mov rdx, rsi
mov qword [rbp + 0x190], rax
mov eax, dword [rcx + 8]
mov dword [rbp + 0x198], eax
movzx eax, byte [rcx + 0xc]
lea rcx, [rbp + 0x19d]
mov byte [rbp + 0x19c], al
call fcn.18017dd20
lea rdx, [rbp + 0x190]
lea rcx, [rbp - 0x20]
call r14
xor edx, edx
mov rax, rbx
div rdi
cmp rax, 1
jbe 0x1800398c5
mov r13, qword [rsp + 0x28]
lea rsi, [rsi + rdi - 0xd]
lea r14, [rax - 1]
nop dword [rax + rax]
lea rcx, [rbp - 0x20]
mov rdx, rsi
call r13
add rsi, rdi
dec r14
jne 0x1800398b0
xor r13d, r13d
mov rcx, qword [rsp + 0x60]
xor eax, eax
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xd8], rax
mov qword [rbp + 0xe0], rax
mov qword [rbp + 0xe8], rax
mov qword [rbp + 0xf0], rax
mov qword [rbp + 0xf8], rax
mov qword [rbp + 0x100], rax
mov qword [rbp + 0x108], rax
mov rax, qword [rsp + 0x30]
add rax, rcx
mov qword [rbp - 0x38], rax
cmp rcx, rax
ja 0x180039b13
nop dword [rax]
mov rax, rcx
mov r10, r13
xor rax, qword [rbp - 0x70]
lea r14, [rax - 1]
not rax
shr rax, 0x3f
shr r14, 0x3f
and r14b, al
mov rax, rcx
xor rax, qword [rbp - 0x60]
neg r14b
lea rsi, [rax - 1]
not rax
shr rsi, 0x3f
shr rax, 0x3f
and sil, al
neg sil
test rdi, rdi
je 0x180039ab6
mov rdx, qword [rsp + 0x78]
movzx ecx, r14b
mov dword [rsp + 0x74], ecx
mov rcx, qword [rsp + 0x50]
lea rax, [rdx + 1]
shr rax, 0x3f
mov r9, rdx
mov qword [rbp - 0x40], rax
movzx eax, sil
shr r9, 0x3f
not al
mov qword [rbp - 0x30], r9
or al, r14b
mov byte [rsp + 0x20], al
mov rax, rdi
movzx r13d, byte [rsp + 0x20]
sub rax, rcx
mov qword [rbp - 0x50], rax
mov rax, rdx
sub rax, rdi
add rax, rcx
mov rcx, rdx
lea rax, [rbp + rax + 0xc0]
neg rcx
mov r15, rax
mov qword [rbp - 0x28], rcx
xor r8b, r8b
cmp rbx, r12
jae 0x1800399d7
mov rax, qword [rsp + 0x58]
jmp 0x1800399ee
mov rax, qword [rbp + 0x320]
add rax, r12
cmp rbx, rax
jae 0x1800399f3
mov rax, qword [rsp + 0x68]
sub rax, r12
movzx r8d, byte [rax + rbx]
lea r11, [rcx + r10]
mov rdx, r10
inc rbx
shr rdx, 0x3f
mov rcx, r11
shr rcx, 0x3f
movzx eax, dl
xor cl, r9b
xor al, r9b
or cl, al
xor cl, dl
dec cl
movzx eax, cl
mov rcx, r10
and eax, dword [rsp + 0x74]
mov dword [rsp + 0x30], eax
not eax
mov dword [rsp + 0x38], eax
mov r9d, dword [rsp + 0x38]
mov eax, dword [rsp + 0x30]
and al, 0x80
and r9b, r8b
mov r8, qword [rsp + 0x78]
or r9b, al
lea rax, [r8 + 1]
sub rcx, rax
mov rax, qword [rbp - 0x40]
shr rcx, 0x3f
xor cl, al
xor al, dl
or cl, al
xor cl, dl
dec cl
and cl, r14b
not cl
and cl, r13b
and r9b, cl
cmp r10, qword [rbp - 0x50]
jb 0x180039a8e
movzx eax, sil
mov dword [rsp + 0x30], eax
not eax
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x30]
movzx ecx, byte [r11 + r15]
and cl, al
mov eax, dword [rsp + 0x38]
and r9b, al
or r9b, cl
mov rcx, qword [rbp - 0x28]
lea rax, [rbp + r8 + 0x210]
inc r10
mov byte [r11 + rax], r9b
mov r9, qword [rbp - 0x30]
cmp r10, rdi
jb 0x1800399c8
mov r15, qword [rsp + 0x40]
xor r13d, r13d
lea rdx, [rbp + 0x210]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x28]
lea rdx, [rbp + 0x210]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x48]
mov r11, r13
test r15, r15
je 0x180039afc
nop dword [rax]
movzx eax, byte [rbp + r11 + 0x210]
inc r11
and al, sil
or byte [rbp + r11 + 0xcf], al
cmp r11, r15
jb 0x180039ae0
mov rcx, qword [rsp + 0x60]
inc rcx
mov qword [rsp + 0x60], rcx
cmp rcx, qword [rbp - 0x38]
jbe 0x180039920
call fcn.18005d310
mov rbx, rax
test rax, rax
je 0x180039bab
mov rcx, qword [rbp - 0x48]
call fcn.180056990
xor r8d, r8d
mov rcx, rbx
mov rdx, rax
call fcn.18005d380
test eax, eax
jle 0x180039bab
cmp byte [rbp + 0x338], 0
je 0x180039bea
mov rdi, qword [rbp - 0x80]
lea rcx, [rbp + 0x110]
mov edx, 0x5c
mov r8, rdi
call fcn.18017e8a0
mov r8, qword [rbp + 0x330]
mov rdx, qword [rbp - 0x78]
mov rcx, rbx
call fcn.18005d5f0
test eax, eax
jle 0x180039bab
lea rdx, [rbp + 0x110]
mov r8, rdi
mov rcx, rbx
call fcn.18005d5f0
test eax, eax
jle 0x180039bab
lea rdx, [rbp + 0xd0]
mov r8, r15
mov rcx, rbx
call fcn.18005d5f0
test eax, eax
jg 0x180039c31
mov rcx, rbx
call fcn.18005d340
xor eax, eax
mov r12, qword [rsp + 0x3b8]
mov r14, qword [rsp + 0x3b0]
mov r15, qword [rsp + 0x3a8]
mov rcx, qword [rbp + 0x290]
xor rcx, rsp
call fcn.180179370
add rsp, 0x3c0
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
test rdi, rdi
je 0x180039c01
nop
xor byte [rbp + r13 + 0x110], 0x6a
inc r13
cmp r13, rdi
jb 0x180039bf0
lea rdx, [rbp + 0x110]
mov r8, rdi
mov rcx, rbx
call fcn.18005d5f0
test eax, eax
jle 0x180039bab
lea rdx, [rbp + 0xd0]
mov r8, r15
mov rcx, rbx
call fcn.18005d5f0
test eax, eax
jle 0x180039bab
mov rdx, qword [rbp - 0x68]
lea r8, [rsp + 0x70]
mov rcx, rbx
call fcn.18005dad0
test eax, eax
je 0x180039c56
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x180039c56
mov eax, dword [rsp + 0x70]
mov qword [rcx], rax
mov rcx, rbx
call fcn.18005d340
mov eax, 1
jmp 0x180039bb5