Function at 0x140039a40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x3c0]
sub rsp, 0x4c0
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x64], 0xff
mov rbx, rcx
xor r13d, r13d
call fcn.140039600
test rax, rax
je 0x14003a8af
mov eax, dword [rbx + 4]
mov r14d, dword [rsp + 0x50]
mov r15d, dword [rsp + 0x4c]
mov edi, dword [rsp + 0x48]
mov dword [rbp - 0x7c], eax
cdq
mov r8d, eax
mov eax, dword [rsp + 0x64]
xor r8d, edx
mov dword [rbp + 0x420], eax
sub r8d, edx
mov dword [rbx + 4], r8d
cmp r14d, 0xc
jne 0x140039ad7
cmp edi, 0x18
jge 0x140039aea
lea ecx, [r15 - 0x26]
mov eax, 0x55555556
imul ecx
mov r13d, edx
shr r13d, 0x1f
add r13d, edx
jmp 0x140039aea
cmp edi, 0x10
jge 0x140039aea
mov r13d, r15d
sub r13d, r14d
sub r13d, 0xe
sar r13d, 2
mov ecx, dword [rbx]
xor eax, eax
cmp dword [rsp + 0x60], eax
setne al
add eax, 3
mov dword [rbx + 8], eax
test ecx, ecx
js 0x14003a8af
jne 0x140039b0f
lea r9d, [rcx*4]
jmp 0x140039b31
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x14003a8af
lea r9d, [rcx*4]
test r9d, r9d
js 0x14003a8af
test r8d, r8d
js 0x14003a8af
je 0x140039b4e
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14003a8af
test ecx, ecx
jne 0x140039b5c
lea r9d, [rcx*4]
jmp 0x140039b7f
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x14003a8af
lea edx, [rcx*4]
test edx, edx
js 0x14003a8af
mov r9d, edx
test r8d, r8d
je 0x140039b96
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14003a8af
imul ecx, r8d
shl ecx, 2
movsxd rcx, ecx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp - 0x78], rax
mov rsi, rax
test rax, rax
je 0x14003a8af
mov qword [rsp + 0x500], r12
cmp edi, 0x10
jge 0x14003a12d
xor edi, edi
test r13d, r13d
je 0x14003a8a2
cmp r13d, 0x100
jg 0x14003a8a2
test r13d, r13d
jle 0x140039d2d
xor r12d, r12d
movsxd rsi, r13d
lea r14, [rbx + 0x30]
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x140039c1f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039c48
cmp dword [rbx + 0x30], edi
lea r14, [rbx + 0x30]
je 0x140039c46
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039c48
xor cl, cl
mov qword [rbp + 0x428], r14
mov byte [rbp + r12*4 - 0x3e], cl
cmp rax, qword [rbx + 0xc0]
jae 0x140039c6c
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039c91
cmp dword [r14], edi
je 0x140039c8f
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039c91
xor cl, cl
mov byte [rbp + r12*4 - 0x3f], cl
cmp rax, qword [rbx + 0xc0]
jae 0x140039cb2
movzx ecx, byte [rax]
lea r14, [rbx + 0x30]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039cd7
cmp dword [r14], edi
je 0x140039cd5
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039cd7
xor cl, cl
cmp dword [rsp + 0x50], 0xc
mov byte [rbp + r12*4 - 0x40], cl
je 0x140039d12
cmp rax, qword [rbx + 0xc0]
jae 0x140039cf8
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039d12
mov rax, qword [rbp + 0x428]
cmp dword [rax], edi
je 0x140039d12
mov rcx, rbx
call fcn.1400306c0
inc qword [rbx + 0xb8]
mov byte [rbp + r12*4 - 0x3d], 0xff
inc r12
cmp r12, rsi
jl 0x140039c00
mov rsi, qword [rbp - 0x78]
mov r14d, dword [rsp + 0x50]
xor eax, eax
cmp r14d, 0xc
setne al
add eax, 3
imul eax, r13d
sub r15d, eax
sub r15d, r14d
sub r15d, 0xe
jns 0x140039d59
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x140039d97
cmp qword [rbx + 0x10], rdi
je 0x140039d8d
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r15d
jge 0x140039d8d
mov rax, qword [rbx + 0xc0]
sub r15d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r15d
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x140039d97
movsxd rax, r15d
add qword [rbx + 0xb8], rax
mov r15d, dword [rsp + 0x48]
mov rcx, rbx
mov eax, 0x10
add rcx, rax
mov qword [rbp + 0x428], rcx
cmp r15d, 1
jne 0x140039dc1
mov r12d, dword [rbx]
add r12d, 7
shr r12d, 3
jmp 0x140039df1
cmp r15d, 4
jne 0x140039ddd
mov r12d, dword [rbx]
lea rax, [rbx + 0x10]
inc r12d
mov qword [rbp + 0x428], rax
shr r12d, 1
jmp 0x140039df1
cmp r15d, 8
jne 0x14003a8a2
mov r12d, dword [rbx]
mov qword [rbp + 0x428], rcx
mov eax, dword [rbx + 4]
neg r12d
and r12d, 3
mov ecx, eax
mov dword [rsp + 0x20], r12d
cmp r15d, 1
jne 0x140039f75
mov dword [rbp + 0x428], edi
test eax, eax
jle 0x14003a7ba
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
mov r14d, 7
cmp rax, qword [rbx + 0xc0]
jae 0x140039e45
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039e6b
cmp dword [rbx + 0x30], 0
je 0x140039e69
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039e6b
xor cl, cl
xor r15d, r15d
movzx edx, cl
mov r13, rbx
cmp dword [rbx], r15d
jle 0x140039f17
lea r12d, [r15 + 0x30]
mov ecx, r14d
mov eax, edx
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rbp + rcx - 0x40]
mov byte [rdi + rsi], al
movzx eax, byte [rbp + rcx - 0x3f]
mov byte [rdi + rsi + 1], al
movzx eax, byte [rbp + rcx - 0x3e]
mov byte [rdi + rsi + 2], al
add rdi, 3
sub r14d, 1
jns 0x140039f06
mov rax, qword [rbx + 0xb8]
mov r14d, 7
cmp rax, qword [rbx + 0xc0]
jae 0x140039edc
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039f03
cmp dword [r12 + r13], 0
je 0x140039f01
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x140039f03
xor cl, cl
movzx edx, cl
inc r15d
cmp r15d, dword [rbx]
jl 0x140039e81
mov r12d, dword [rsp + 0x20]
cmp qword [rbx + 0x10], 0
je 0x140039f4b
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r12d
jge 0x140039f4b
mov rax, qword [rbx + 0xc0]
mov edx, r12d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140039f55
mov eax, r12d
add qword [rbx + 0xb8], rax
mov edx, dword [rbp + 0x428]
mov eax, dword [rbx + 4]
inc edx
mov dword [rbp + 0x428], edx
mov ecx, eax
cmp edx, eax
jl 0x140039e20
jmp 0x14003a7ba
xor r13d, r13d
test eax, eax
jle 0x14003a7ba
xor r14d, r14d
cmp dword [rbx], r14d
jle 0x14003a0d3
nop dword [rax]
mov r8, qword [rbx + 0xb8]
cmp r8, qword [rbx + 0xc0]
jae 0x140039fb0
movzx ecx, byte [r8]
inc r8
mov qword [rbx + 0xb8], r8
jmp 0x140039fd7
cmp dword [rbx + 0x30], 0
je 0x140039fd5
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
lea r8, [rax + 1]
mov qword [rbx + 0xb8], r8
jmp 0x140039fd7
xor cl, cl
mov edx, 0x30
xor r10d, r10d
mov rax, rbx
movzx eax, cl
lea r11, [rbx + rdx]
cmp r15d, 4
jne 0x140039ff9
mov r10d, eax
and r10d, 0xf
shr eax, 4
mov r9d, dword [rbx]
lea rdx, [rax*4]
movzx eax, byte [rbp + rdx - 0x40]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x3f]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x3e]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
lea eax, [r14 + 1]
cmp eax, r9d
je 0x14003a0d3
cmp r15d, 8
jne 0x14003a08e
cmp r8, qword [rbx + 0xc0]
jae 0x14003a061
movzx ecx, byte [r8]
lea rax, [r8 + 1]
mov qword [rbx + 0xb8], rax
jmp 0x14003a08a
cmp dword [r11], 0
je 0x14003a088
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
mov r9d, dword [rbx]
jmp 0x14003a08a
xor cl, cl
movzx r10d, cl
movsxd rcx, edi
lea rdx, [r10*4]
movzx eax, byte [rbp + rdx - 0x40]
inc edi
add r14d, 2
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x3f]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x3e]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
cmp r14d, r9d
jl 0x140039f90
mov rax, qword [rbp + 0x428]
cmp qword [rax], 0
je 0x14003a10d
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r12d
jge 0x14003a10d
mov rax, qword [rbx + 0xc0]
mov edx, r12d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x14003a117
mov eax, r12d
add qword [rbx + 0xb8], rax
mov eax, dword [rbx + 4]
inc r13d
mov ecx, eax
cmp r13d, eax
jl 0x140039f80
jmp 0x14003a7ba
xor r11d, r11d
sub r15d, r14d
sub r15d, 0xe
mov dword [rsp + 0x30], r11d
mov edx, r11d
mov dword [rsp + 0x34], r11d
mov dword [rsp + 0x40], edx
mov r8d, r11d
mov dword [rsp + 0x38], r11d
mov r12d, r11d
mov dword [rbp + 0x428], r11d
mov r9d, r11d
mov r10d, r11d
mov dword [rsp + 0x3c], r11d
mov r13d, r11d
jns 0x14003a17a
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x14003a1c7
cmp qword [rbx + 0x10], rdx
je 0x14003a1bd
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r15d
jge 0x14003a1bd
mov rax, qword [rbx + 0xc0]
sub r15d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r15d
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
mov edx, r12d
mov r9d, r12d
mov r8d, edx
mov r10d, r12d
xor r11d, r11d
jmp 0x14003a1c7
movsxd rax, r15d
add qword [rbx + 0xb8], rax
cmp edi, 0x18
jne 0x14003a1d4
mov eax, dword [rbx]
lea r14d, [rax + rax*2]
jmp 0x14003a1e4
cmp edi, 0x10
jne 0x14003a1e1
mov r14d, dword [rbx]
add r14d, r14d
jmp 0x14003a1e4
mov r14d, r11d
mov eax, dword [rsp + 0x5c]
neg r14d
mov ecx, dword [rsp + 0x58]
and r14d, 3
mov dword [rsp + 0x24], r14d
cmp edi, 0x18
jne 0x14003a20d
mov r11d, 1
mov qword [rsp + 0x28], r11
jmp 0x14003a3f1
mov qword [rsp + 0x28], r11
cmp edi, 0x20
jne 0x14003a265
xor r11d, r11d
mov qword [rsp + 0x28], r11
cmp eax, 0xff
jne 0x14003a265
mov qword [rsp + 0x28], r11
cmp ecx, 0xff00
jne 0x14003a265
cmp dword [rsp + 0x54], 0xff0000
mov r15d, dword [rsp + 0x60]
mov qword [rsp + 0x28], r11
jne 0x14003a26a
mov qword [rsp + 0x28], r11
cmp r15d, 0xff000000
jne 0x14003a26a
mov r11d, 2
mov qword [rsp + 0x28], r11
jmp 0x14003a3f1
mov r15d, dword [rsp + 0x60]
mov r9d, dword [rsp + 0x54]
test r9d, r9d
je 0x14003a8a2
test ecx, ecx
je 0x14003a8a2
test eax, eax
je 0x14003a8a2
mov ecx, r9d
call fcn.140039590
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
mov r9d, dword [rsp + 0x58]
and edx, 0x55555555
and ecx, 0x55555555
mov dword [rsp + 0x30], eax
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r9d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r12d, al
call fcn.140039590
mov r10d, dword [rsp + 0x5c]
sub eax, 7
mov dword [rsp + 0x34], eax
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r10d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r9d, al
call fcn.140039590
sub eax, 7
mov edx, r10d
shr edx, 1
mov ecx, r10d
and edx, 0x55555555
mov dword [rsp + 0x38], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r15d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r10d, al
call fcn.140039590
mov edx, r15d
mov ecx, r15d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea r8d, [rax - 7]
mov ecx, edx
mov dword [rbp + 0x428], r8d
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx edx, al
mov eax, dword [rbx + 4]
mov ecx, eax
mov dword [rsp + 0x20], r13d
test eax, eax
jle 0x14003a7ba
mov eax, dword [rsp + 0x30]
lea r15, [rbx + 0xc0]
neg eax
mov dword [rsp + 0x68], eax
mov eax, 8
mov ecx, eax
sub ecx, r12d
mov dword [rsp + 0x6c], ecx
mov ecx, dword [rsp + 0x34]
neg ecx
mov dword [rsp + 0x70], ecx
mov ecx, eax
sub ecx, r9d
mov dword [rsp + 0x74], ecx
mov ecx, dword [rsp + 0x38]
neg ecx
mov dword [rsp + 0x78], ecx
mov ecx, eax
sub ecx, r10d
mov dword [rsp + 0x7c], ecx
mov ecx, r8d
neg ecx
sub eax, edx
mov dword [rbp - 0x80], ecx
mov dword [rsp + 0x40], eax
mov eax, r12d
mov qword [rbp - 0x70], rax
mov eax, r10d
mov qword [rbp - 0x60], rax
mov eax, edx
mov ecx, r9d
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x68], rcx
mov eax, dword [rbx]
xor r12d, r12d
mov qword [rbp - 0x50], r15
movsxd rcx, r13d
test r11, r11
je 0x14003a5e0
test eax, eax
jle 0x14003a75c
lea r14, [rcx + rsi]
lea rdi, [rbx + 0x30]
nop word [rax + rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [r15]
jae 0x14003a4bb
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a4e5
cmp dword [rbx + 0x30], 0
lea rdi, [rbx + 0x30]
je 0x14003a4e3
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a4e5
xor cl, cl
mov r13, rdi
mov byte [r14 + 2], cl
cmp rax, qword [r15]
jae 0x14003a500
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a525
cmp dword [rdi], 0
je 0x14003a523
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a525
xor cl, cl
mov byte [r14 + 1], cl
cmp rax, qword [r15]
jae 0x14003a541
movzx ecx, byte [rax]
lea rdi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a566
cmp dword [rdi], 0
je 0x14003a564
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a566
xor cl, cl
cmp qword [rsp + 0x28], 2
mov byte [r14], cl
jne 0x14003a5ae
cmp rax, qword [r15]
jae 0x14003a585
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a5b0
cmp dword [r13], 0
je 0x14003a5aa
mov rcx, rbx
call fcn.1400306c0
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x14003a5b0
xor cl, cl
jmp 0x14003a5b0
mov cl, 0xff
mov r13d, dword [rsp + 0x3c]
inc r12d
add r13d, 4
movzx eax, cl
or dword [rbp + 0x420], eax
mov byte [r14 + 3], cl
add r14, 4
mov dword [rsp + 0x3c], r13d
cmp r12d, dword [rbx]
jl 0x14003a4a0
jmp 0x14003a757
test eax, eax
jle 0x14003a75c
mov r15d, dword [rsp + 0x40]
lea r14, [rcx + rsi]
mov esi, dword [rbp + 0x428]
mov rcx, rbx
call fcn.1400308c0
cmp edi, 0x10
jne 0x14003a609
mov r8d, eax
jmp 0x14003a621
mov rcx, rbx
mov edi, eax
call fcn.1400308c0
mov r8d, eax
shl r8d, 0x10
add r8d, edi
mov edi, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x30]
lea r10, [0x140000000]
mov ecx, r9d
mov edx, r8d
and edx, dword [rsp + 0x54]
mov eax, edx
sar eax, cl
mov ecx, dword [rsp + 0x68]
shl edx, cl
mov ecx, dword [rsp + 0x6c]
test r9d, r9d
mov r9d, dword [rsp + 0x34]
cmovns edx, eax
mov rax, qword [rbp - 0x70]
sar edx, cl
imul edx, dword [r10 + rax*4 + 0x4a6f8]
mov ecx, dword [r10 + rax*4 + 0x4a720]
sar edx, cl
mov ecx, r9d
mov byte [r14], dl
mov edx, r8d
and edx, dword [rsp + 0x58]
mov eax, edx
sar eax, cl
mov ecx, dword [rsp + 0x70]
shl edx, cl
mov ecx, dword [rsp + 0x74]
test r9d, r9d
mov r9d, dword [rsp + 0x38]
cmovns edx, eax
mov rax, qword [rbp - 0x68]
sar edx, cl
imul edx, dword [r10 + rax*4 + 0x4a6f8]
mov ecx, dword [r10 + rax*4 + 0x4a720]
sar edx, cl
mov ecx, r9d
mov byte [r14 + 1], dl
mov edx, r8d
and edx, dword [rsp + 0x5c]
mov eax, edx
sar eax, cl
mov ecx, dword [rsp + 0x78]
shl edx, cl
mov ecx, dword [rsp + 0x7c]
test r9d, r9d
mov r9, qword [rbp - 0x60]
cmovns edx, eax
mov eax, dword [rsp + 0x60]
sar edx, cl
imul edx, dword [r10 + r9*4 + 0x4a6f8]
mov ecx, dword [r10 + r9*4 + 0x4a720]
sar edx, cl
mov byte [r14 + 2], dl
test eax, eax
je 0x14003a725
mov rdx, qword [rbp - 0x58]
and r8d, eax
mov eax, r8d
mov ecx, esi
sar eax, cl
mov ecx, dword [rbp - 0x80]
shl r8d, cl
mov ecx, r15d
test esi, esi
cmovns r8d, eax
sar r8d, cl
imul r8d, dword [r10 + rdx*4 + 0x4a6f8]
mov ecx, dword [r10 + rdx*4 + 0x4a720]
sar r8d, cl
jmp 0x14003a72b
mov r8d, 0xff
or dword [rbp + 0x420], r8d
add r13d, 4
mov byte [r14 + 3], r8b
inc r12d
add r14, 4
cmp r12d, dword [rbx]
jl 0x14003a5f7
mov rsi, qword [rbp - 0x78]
mov r15, qword [rbp - 0x50]
mov dword [rsp + 0x3c], r13d
mov r14d, dword [rsp + 0x24]
cmp qword [rbx + 0x10], 0
je 0x14003a789
mov ecx, dword [r15]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r14d
jge 0x14003a790
mov rax, qword [r15]
mov edx, r14d
sub edx, ecx
mov qword [rbx + 0xb8], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x14003a79a
lea r15, [rbx + 0xc0]
mov eax, r14d
add qword [rbx + 0xb8], rax
mov edx, dword [rsp + 0x20]
mov eax, dword [rbx + 4]
inc edx
mov edi, dword [rsp + 0x48]
mov ecx, eax
mov r11, qword [rsp + 0x28]
mov dword [rsp + 0x20], edx
cmp edx, eax
jl 0x14003a471
cmp dword [rbp + 0x420], 0
jne 0x14003a7e1
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rdx, eax
test eax, eax
js 0x14003a7e1
mov byte [rdx + rsi], 0xff
sub rdx, 4
jns 0x14003a7d4
mov ecx, dword [rbx + 4]
cmp dword [rbp - 0x7c], 0
jle 0x14003a860
xor r10d, r10d
mov edx, ecx
test ecx, 0xfffffffe
jle 0x14003a860
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, ecx
imul edx, ecx
xor r8d, r8d
imul r9d, r10d
lea eax, [rcx*4]
shl edx, 2
mov r11d, edx
add rdx, rsi
shl r9d, 2
test eax, eax
jle 0x14003a84f
sub r9, r11
nop
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [r9 + rdx]
mov byte [r9 + rdx], al
mov byte [rdx], cl
lea rdx, [rdx + 1]
mov eax, dword [rbx]
shl eax, 2
cmp r8d, eax
jl 0x14003a830
mov ecx, dword [rbx + 4]
inc r10d
mov eax, ecx
mov edx, ecx
sar eax, 1
cmp r10d, eax
jl 0x14003a800
mov eax, dword [rbx]
mov rdx, qword [rbp + 0x408]
mov dword [rdx], eax
mov rax, qword [rbp + 0x410]
mov dword [rax], ecx
mov rcx, qword [rbp + 0x418]
test rcx, rcx
je 0x14003a885
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rsi
mov r12, qword [rsp + 0x500]
add rsp, 0x4c0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
jmp 0x14003a888
xor eax, eax
jmp 0x14003a890