Function at 0x180041b80
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1390]
mov eax, 0x1490
call fcn.1800ad800
sub rsp, rax
mov rax, qword [0x1800e2240]
xor rax, rsp
mov qword [rbp + 0x12f0], rax
mov rsi, rcx
mov rcx, qword [0x1801a5878]
test rcx, rcx
jne 0x180041bc8
xor r13d, r13d
jmp 0x180041bd7
mov rax, qword [rcx]
mov rdx, qword [rax + 0xe0]
call rdx
mov r13, rax
mov rax, qword [r13 + 0x7e8]
mov rcx, qword [rsi + 0x98]
mov qword [rsp + 0x48], rax
mov r12, qword [rax + 0xc0]
cmp rcx, qword [rsi + 0xa0]
je 0x180041c01
mov qword [rsi + 0xa0], rcx
mov qword [rsp + 0x14c8], rbx
mov rcx, rsi
mov qword [rsp + 0x14d0], rdi
movaps xmmword [rsp + 0x1480], xmm6
movaps xmmword [rsp + 0x1470], xmm7
movaps xmmword [rsp + 0x1410], xmm13
call fcn.180041910
mov r15, qword [rsi + 0x98]
mov r14d, 1
cmp r15, qword [rsi + 0xa0]
jne 0x180041c55
xorps xmm0, xmm0
cvtpd2ps xmm13, xmm0
jmp 0x180041d25
mov rax, qword [r15]
mov rdi, qword [r13 + 0x2c8]
movsd xmm1, qword [0x1800c9fe8]
mov rbx, qword [rax + 0x2c8]
movss xmm0, dword [rdi + 8]
subss xmm0, dword [rbx + 8]
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll_pow
movsd xmm1, qword [0x1800c9fe8]
movaps xmm7, xmm0
movss xmm0, dword [rdi]
subss xmm0, dword [rbx]
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll_pow
addsd xmm7, xmm0
xorps xmm1, xmm1
ucomisd xmm1, xmm7
ja 0x180041cb1
xorps xmm0, xmm0
sqrtsd xmm0, xmm7
jmp 0x180041cb9
movaps xmm0, xmm7
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
movss xmm3, dword [rdi + 4]
xorps xmm13, xmm13
mov rax, qword [r15]
movss xmm2, dword [0x1800c9fe0]
cvtsd2ss xmm13, xmm0
mov rcx, qword [rax + 0x2c8]
movss xmm1, dword [rcx + 4]
addss xmm1, dword [rsi + 0xd4]
comiss xmm1, xmm3
movaps xmm0, xmm1
subss xmm0, xmm3
andps xmm0, xmmword [0x1800caac0]
jbe 0x180041d0a
comiss xmm0, xmm2
jb 0x180041d0a
mov dword [0x1801a5848], 0
jmp 0x180041d25
comiss xmm3, xmm1
jbe 0x180041d1b
comiss xmm0, xmm2
mov dword [0x1801a5848], r14d
jae 0x180041d25
mov dword [0x1801a5848], 9
mov eax, dword [rsi + 0x124]
inc eax
mov dword [rsi + 0x124], eax
cmp r15, qword [rsi + 0xa0]
je 0x1800423f6
cmp eax, dword [rsi + 0xdc]
jl 0x1800423f6
mov rcx, qword [r15]
movaps xmmword [rsp + 0x1460], xmm8
movaps xmmword [rsp + 0x1450], xmm9
movaps xmmword [rsp + 0x1440], xmm10
mov rax, qword [rcx + 0x2c8]
movaps xmmword [rsp + 0x1430], xmm11
movaps xmmword [rsp + 0x1420], xmm12
mov ecx, dword [rax + 4]
mov dword [rsi + 0xb8], ecx
mov rcx, qword [0x1801a5878]
test rcx, rcx
je 0x180041e59
mov rax, qword [rcx]
mov rdx, qword [rax + 0xe0]
call rdx
test rax, rax
je 0x180041e59
mov rax, qword [rax + 0x7e8]
test rax, rax
je 0x180041e59
mov r15, qword [rax + 0xc0]
test r15, r15
je 0x180041e59
mov edi, dword [rax + 0x10]
xorps xmm7, xmm7
movss xmm8, dword [0x1800c9fa0]
xor ebx, ebx
mov dword [rsp + 0x30], edi
nop word [rax + rax]
mov rax, qword [r15]
mov edx, ebx
mov rcx, r15
call qword [rax + 0x28]
test rax, rax
je 0x180041e50
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x180041e50
mov rdi, qword [rcx]
test rdi, rdi
je 0x180041e4c
mov rcx, rax
call fcn.18003e100
mov rcx, rdi
movd xmm6, eax
mov rax, qword [rdi]
cvtdq2ps xmm6, xmm6
mulss xmm6, xmm8
call qword [rax + 0x110]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
addss xmm0, xmm6
comiss xmm0, xmm7
jbe 0x180041e4c
movaps xmm7, xmm0
mov dword [rsp + 0x30], ebx
mov edi, ebx
jmp 0x180041e50
mov edi, dword [rsp + 0x30]
inc ebx
cmp ebx, 9
jl 0x180041df0
jmp 0x180041e62
mov edi, 0xffffffff
mov dword [rsp + 0x30], edi
mov rcx, qword [rsp + 0x48]
mov r15d, dword [rcx + 0x10]
cmp edi, r15d
je 0x180041f06
mov eax, dword [rsi + 0x11c]
dec eax
cmp eax, r14d
ja 0x180041f06
mov dword [rcx + 0x10], edi
cmp dword [rsi + 0x11c], 2
jne 0x180041f06
mov rax, qword [r12]
mov edx, edi
mov rcx, r12
call qword [rax + 0x28]
mov rcx, r13
mov rbx, rax
call fcn.180036570
mov r9d, edi
mov dword [rsp + 0x20], edi
mov r8, rbx
lea rcx, [rsp + 0x60]
mov rdx, rax
call fcn.180036610
mov rcx, qword [0x1801a5878]
test rcx, rcx
jne 0x180041ecf
xor eax, eax
jmp 0x180041edb
mov rax, qword [rcx]
mov rdx, qword [rax + 0xe0]
call rdx
mov r8, qword [rax]
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [r8 + 0x840]
mov rax, qword [0x1801a5878]
lea rdx, [rsp + 0x60]
mov rcx, qword [rax + 0xf0]
mov rax, qword [rcx]
call qword [rax + htons]
cmp qword [0x1801a5878], 0
jne 0x180041f18
xor r12d, r12d
mov ecx, r12d
jmp 0x180041f31
mov rcx, qword [0x1801a5878]
mov rax, qword [rcx]
mov rdx, qword [rax + 0xe0]
call rdx
mov rcx, rax
xor r12d, r12d
mov rax, qword [rsi + 0x98]
lea r8, [rsp + 0x38]
mov rcx, qword [rcx + 0x2c8]
mov rdx, qword [rax]
mov rax, qword [rdx + 0x2c8]
lea rdx, [rsp + 0x50]
movss xmm0, dword [rax]
movss xmm1, dword [rax + 4]
movss dword [rsp + 0x38], xmm0
movss xmm0, dword [rax + 8]
movss dword [rsp + 0x40], xmm0
movss dword [rsp + 0x3c], xmm1
call fcn.180036c30
movss xmm12, dword [0x1800ca0bc]
movss xmm8, dword [0x1800ca188]
movss xmm0, dword [rax]
comiss xmm0, xmm12
movss xmm6, dword [rax + 4]
jbe 0x180041fab
nop dword [rax]
addss xmm0, xmm8
comiss xmm0, xmm12
ja 0x180041fa0
movss xmm9, dword [0x1800ca0ec]
comiss xmm6, xmm9
movss xmm10, dword [0x1800ca18c]
jbe 0x180041fce
addss xmm6, xmm10
comiss xmm6, xmm9
ja 0x180041fc3
comiss xmm8, xmm6
movss xmm11, dword [0x1800ca114]
jbe 0x180041feb
nop dword [rax]
addss xmm6, xmm11
comiss xmm8, xmm6
ja 0x180041fe0
cmp dword [rsi + 0x128], 2
jne 0x18004203e
mov rax, qword [0x1801a5868]
movsd xmm0, qword [rax + 0x3e58]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [0x1800c9eec]
call sub.api_ms_win_crt_math_l1_1_0.dll_cosf
mov eax, dword [rsi + 0xd0]
mulss xmm0, dword [0x1800ca058]
mov rcx, qword [r13 + 0x2d8]
addss xmm0, xmm6
mov dword [rcx], eax
mov rax, qword [r13 + 0x2d8]
movaps xmm6, xmm0
movss dword [rax + 4], xmm0
cmp dword [rsi + 0x128], 3
jne 0x1800421d0
movd xmm0, dword [rsi + 0x108]
cvtdq2ps xmm0, xmm0
mov dword [0x1801a5840], r12d
comiss xmm0, xmm13
jbe 0x1800421b5
mov rax, qword [rsi + 0x98]
xorps xmm6, xmm6
cvtsi2ss xmm6, dword [rsi + 0x114]
mov rax, qword [rax]
movaps xmmword [rsp + 0x1400], xmm14
mov rbx, qword [rax + 0x2c8]
mov rax, qword [rax + 0x2d8]
movss xmm14, dword [rbx + 4]
movss xmm0, dword [rax + 4]
cvtps2pd xmm0, xmm0
mulsd xmm0, qword [0x1800c9f98]
cvtpd2ps xmm7, xmm0
addss xmm7, dword [0x1800c9fb0]
movaps xmm0, xmm7
call sub.api_ms_win_crt_math_l1_1_0.dll_cosf
movaps xmm13, xmm0
movaps xmm0, xmm7
mulss xmm13, xmm6
addss xmm13, dword [rbx]
call sub.api_ms_win_crt_math_l1_1_0.dll_sinf
cmp qword [0x1801a5878], 0
movaps xmm7, xmm0
mulss xmm7, xmm6
addss xmm7, dword [rbx + 8]
jne 0x1800420ee
mov rax, r12
jmp 0x180042101
mov rcx, qword [0x1801a5878]
mov rax, qword [rcx]
mov rdx, qword [rax + 0xe0]
call rdx
mov rcx, qword [rax + 0x2c8]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x50]
movss dword [rsp + 0x38], xmm13
movss dword [rsp + 0x3c], xmm14
movss dword [rsp + 0x40], xmm7
call fcn.180036c30
movaps xmm14, xmmword [rsp + 0x1400]
movss xmm1, dword [rax]
comiss xmm1, xmm12
movss xmm0, dword [rax + 4]
jbe 0x18004214e
addss xmm1, xmm8
comiss xmm1, xmm12
ja 0x180042143
movss xmm2, dword [0x1800ca184]
comiss xmm2, xmm1
jbe 0x18004216a
nop dword [rax + rax]
addss xmm1, xmm9
comiss xmm2, xmm1
ja 0x180042160
comiss xmm0, xmm9
jbe 0x18004217b
addss xmm0, xmm10
comiss xmm0, xmm9
ja 0x180042170
comiss xmm8, xmm0
jbe 0x18004218c
addss xmm0, xmm11
comiss xmm8, xmm0
ja 0x180042181
mov rax, qword [r13 + 0x2d8]
addss xmm1, dword [rsi + 0x100]
movss dword [rax], xmm1
addss xmm0, dword [rsi + 0x100]
mov rax, qword [r13 + 0x2d8]
movss dword [rax + 4], xmm0
jmp 0x1800421d0
mov eax, dword [rsi + 0xd0]
mov rcx, qword [r13 + 0x2d8]
mov dword [rcx], eax
mov rax, qword [r13 + 0x2d8]
movss dword [rax + 4], xmm6
cmp dword [rsi + 0x128], 4
jne 0x1800422e2
mov rax, qword [rsi + 0x98]
movd xmm7, dword [rsi + 0x114]
mov dword [0x1801a5840], r14d
cvtdq2ps xmm7, xmm7
mov rax, qword [rax]
mov rbx, qword [rax + 0x2c8]
mov rax, qword [rax + 0x2d8]
movss xmm13, dword [rbx + 4]
movss xmm0, dword [rax + 4]
cvtps2pd xmm0, xmm0
mulsd xmm0, qword [0x1800c9f98]
cvtpd2ps xmm6, xmm0
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_cosf
movaps xmm12, xmm0
movaps xmm0, xmm6
mulss xmm12, xmm7
addss xmm12, dword [rbx]
call sub.api_ms_win_crt_math_l1_1_0.dll_sinf
cmp qword [0x1801a5878], 0
movaps xmm6, xmm0
mulss xmm6, xmm7
addss xmm6, dword [rbx + 8]
jne 0x18004225a
mov rax, r12
jmp 0x18004226d
mov rcx, qword [0x1801a5878]
mov rax, qword [rcx]
mov rdx, qword [rax + 0xe0]
call rdx
mov rcx, qword [rax + 0x2c8]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x50]
movss dword [rsp + 0x38], xmm12
movss dword [rsp + 0x3c], xmm13
movss dword [rsp + 0x40], xmm6
call fcn.180036c30
movss xmm0, dword [rax + 4]
comiss xmm0, xmm9
jbe 0x1800422ad
addss xmm0, xmm10
comiss xmm0, xmm9
ja 0x1800422a2
comiss xmm8, xmm0
jbe 0x1800422be
addss xmm0, xmm11
comiss xmm8, xmm0
ja 0x1800422b3
mov rax, qword [r13 + 0x2d8]
mov dword [rax], r12d
mov rax, qword [r13 + 0x2d8]
mov dword [rax + 4], 0x42b40000
cvttss2si eax, xmm0
mov dword [0x1801a5844], eax
jmp 0x1800422e9
mov dword [0x1801a5840], r12d
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
movaps xmm12, xmmword [rsp + 0x1420]
movaps xmm11, xmmword [rsp + 0x1430]
movaps xmm10, xmmword [rsp + 0x1440]
movaps xmm9, xmmword [rsp + 0x1450]
movaps xmm8, xmmword [rsp + 0x1460]
mov dword [rsp + 0x64], eax
mov dword [rbp + 0x12e4], 0xffffffff
nop word [rax + rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, r14d
mov dword [rsp + r14*4 + 0x64], eax
inc r14
cmp r14, 0x270
jb 0x180042330
mov eax, dword [rsi + 0x110]
mov dword [rsp + 0x60], 0x270
cmp eax, 1
jne 0x180042447
mov r14, qword [rsi + 0xa0]
mov rdi, qword [rsi + 0x98]
cmp rdi, r14
je 0x1800423d4
nop dword [rax + rax]
mov rax, qword [rdi]
cmp dword [rax + 0x214], 8
jle 0x180042395
cmp byte [rsi + 0x120], 0
jne 0x1800423cb
mov eax, dword [rsi + 0xe0]
test eax, eax
jle 0x1800423cb
mov ebx, eax
lea rcx, [rsp + 0x60]
call fcn.180041050
imul ecx, eax, 0x64
cmp ecx, 0x5f
ja 0x1800423c5
lea rcx, [rsp + 0x60]
call fcn.180041050
imul ecx, eax, 0x64
cmp ecx, 0x60
jb 0x1800423b3
sub rbx, 1
jne 0x1800423a1
add rdi, 8
cmp rdi, r14
jne 0x180042380
mov edi, dword [rsp + 0x30]
cmp edi, r15d
je 0x1800423ef
cmp dword [rsi + 0x11c], 2
jne 0x1800423ef
mov rax, qword [rsp + 0x48]
mov dword [rax + 0x10], r15d
mov dword [rsi + 0x124], r12d
movaps xmm13, xmmword [rsp + 0x1410]
movaps xmm7, xmmword [rsp + 0x1470]
movaps xmm6, xmmword [rsp + 0x1480]
mov rdi, qword [rsp + 0x14d0]
mov rbx, qword [rsp + 0x14c8]
mov rcx, qword [rbp + 0x12f0]
xor rcx, rsp
call fcn.1800ac5b0
mov rsi, qword [rsp + 0x14d8]
add rsp, 0x1490
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
test eax, eax
jne 0x1800423d8
mov rax, qword [rsi + 0x98]
mov rcx, qword [rax]
cmp dword [rcx + 0x214], 8
jle 0x18004246b
cmp byte [rsi + 0x120], 0
jne 0x1800423d8
mov eax, dword [rsi + 0xe0]
test eax, eax
jle 0x1800423d8
mov ebx, eax
nop dword [rax + rax]
lea rcx, [rsp + 0x60]
call fcn.180041050
imul ecx, eax, 0x64
cmp ecx, 0x5f
ja 0x1800424a4
lea rcx, [rsp + 0x60]
call fcn.180041050
imul ecx, eax, 0x64
cmp ecx, 0x60
jb 0x180042492
sub rbx, 1
jne 0x180042480
jmp 0x1800423d8