Function at 0x140031d30
Capabilities:
Check for software breakpoints
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rsi
push r13
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x140300040]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r15d, dword [rsp + 0xc0]
mov rsi, rcx
movsxd r13, dword [rsp + 0xb0]
mov rbx, qword [rcx + 0x28]
mov qword [rsp + 0x30], r9
lea eax, [r15 - 3]
mov qword [rsp + 0x38], r8
cmp eax, 1
jbe 0x140031d8b
xor r14d, r14d
mov dword [rcx + 0x10], 0xbad20012
mov dword [rcx + 0x14], r14d
xor eax, eax
jmp 0x140031efb
mov eax, dword [r8 + 0x18]
mov ecx, 1
test eax, eax
cmovne ecx, eax
imul ecx, dword [rbx + 0x48]
cmp dword [rbx + 0x40], 4
mov dword [rbx + 0x48], ecx
je 0x140031dbe
cmp r15d, 4
mov byte [rbx + 0x62], 0
mov eax, 8
mov ecx, InitCommonControls
cmove eax, ecx
mov dword [rbx + 0x40], eax
mov eax, dword [rbx + 0x24]
lea rdx, [0x1401befc0]
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], r12
cmp eax, 0xca
jne 0x140031e21
mov rax, qword [rbx + 0x200]
lea rcx, [0x1401bee50]
mov qword [rax], rcx
mov rcx, rbx
mov qword [rax + 8], rdx
mov byte [rax + 0x10], 0
mov byte [rax + 0x6c], 0
call fcn.1401be4a0
cmp byte [rbx + 0x58], 0
je 0x140031e18
mov dword [rbx + 0x24], 0xcf
jmp 0x140031ec9
mov dword [rbx + 0x24], 0xcb
jmp 0x140031e28
cmp eax, 0xcb
jne 0x140031e9b
mov rax, qword [rbx + 0x220]
cmp byte [rax + 0x20], 0
je 0x140031e8d
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140031e43
mov rcx, rbx
call qword [rax]
mov rax, qword [rbx + 0x220]
mov rcx, rbx
call qword [rax]
test eax, eax
je 0x140031ee7
cmp eax, 2
je 0x140031e8d
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140031e35
dec eax
test eax, 0xfffffffd
jne 0x140031e35
inc dword [rcx + 8]
mov rdx, qword [rbx + 0x10]
mov r8d, dword [rdx + 0xc]
cmp dword [rcx + 8], r8d
jl 0x140031e35
mov ecx, dword [rbx + 0x184]
add ecx, r8d
mov dword [rdx + 0xc], ecx
jmp 0x140031e35
mov eax, dword [rbx + 0x9c]
mov dword [rbx + 0xa4], eax
jmp 0x140031ebd
cmp eax, 0xcc
je 0x140031ebd
mov rax, qword [rbx]
mov dword [rax + 0x28], ILIsEqual
mov rcx, qword [rbx]
mov eax, dword [rbx + 0x24]
mov dword [rcx + 0x2c], eax
mov rcx, rbx
mov rax, qword [rbx]
call qword [rax]
mov rcx, rbx
call fcn.1401ba380
test al, al
je 0x140031ee7
mov r8d, dword [rbx + 0x74]
mov eax, r13d
cdq
idiv r15d
cmp eax, r8d
jge 0x140031f15
xor r14d, r14d
mov dword [rsi + 0x10], 0xbad20001
mov dword [rsi + 0x14], r14d
xor eax, eax
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x98]
mov r12, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401f74b0
add rsp, 0x60
pop r15
pop r14
pop r13
pop rsi
pop rbx
ret
mov rax, qword [rbx + 8]
lea r8d, [r8*4 + 0x1c]
mov edx, 1
mov rcx, rbx
mov r9d, edx
mov rax, qword [rax + 0x10]
call qword [case.0x140038ca6.0]
mov r12, rax
test rax, rax
je 0x140031ee7
mov ecx, dword [rbx + 0x40]
mov ebp, dword [rbx + 0x74]
cmp ecx, 0xd
je 0x1400320d8
cmp ecx, 8
je 0x1400320d8
xor r14d, r14d
cmp ecx, 4
jne 0x1400320c8
mov eax, dword [rbx + 0x78]
mov edi, r14d
cmp dword [rbx + 0x98], eax
jae 0x1400320a4
mov rdx, r12
mov rcx, rbx
call fcn.1401ba480
test eax, eax
je 0x140031ee7
mov rax, qword [r12]
mov r8, r13
movsxd r10, edi
imul r8, r10
add r8, qword [rsp + 0x30]
cmp r15d, 3
jne 0x140031ffd
test ebp, ebp
jle 0x140032051
add r8, 2
lea rdx, [rax + 2]
mov r9, rbp
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [rdx + 1]
lea r8, [r8 + 3]
movzx eax, byte [rdx]
lea rdx, [rdx + 4]
imul eax, ecx
shr eax, 8
mov byte [r8 - 5], al
movzx eax, byte [rdx - 5]
imul eax, ecx
shr eax, 8
mov byte [r8 - 4], al
movzx eax, byte [rdx - 6]
imul eax, ecx
shr eax, 8
mov byte [r8 - 3], al
sub r9, 1
jne 0x140031fc0
jmp 0x140032051
cmp r15d, 4
jne 0x140032051
test ebp, ebp
jle 0x140032051
lea rdx, [rax + 2]
sub r8, rax
mov r9, rbp
movzx ecx, byte [rdx + 1]
movzx eax, byte [rdx]
lea rdx, [rdx + 4]
imul eax, ecx
shr eax, 8
mov byte [r8 + rdx - 6], al
movzx eax, byte [rdx - 5]
imul eax, ecx
shr eax, 8
mov byte [r8 + rdx - 5], al
movzx eax, byte [rdx - 6]
imul eax, ecx
mov byte [r8 + rdx - 3], 0xff
shr eax, 8
mov byte [r8 + rdx - 4], al
sub r9, 1
jne 0x140032011
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140032093
mov eax, edi
and eax, 0x8000000f
jge 0x14003206a
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x140032093
mov r8d, dword [rbx + 0x78]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r14d
mov rdx, r10
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140038ca6.0]
cmp dword [rsp + 0x40], r14d
jne 0x1400320b8
mov eax, dword [rbx + 0x78]
inc edi
cmp dword [rbx + 0x98], eax
jb 0x140031f74
mov rax, qword [rsp + 0x38]
mov dword [rax + 0x120], 1
jmp 0x140032177
mov dword [rsi + 0x14], r14d
mov dword [rsi + 0x10], 0xbad20008
jmp 0x140031ee7
mov dword [rsi + 0x14], r14d
mov dword [rsi + 0x10], 0xbad20003
jmp 0x140031ee7
mov eax, dword [rbx + 0x78]
xor r14d, r14d
mov edi, r14d
cmp dword [rbx + 0x98], eax
jae 0x140032177
mov r15, r13
mov r13, qword [rsp + 0x30]
nop word [rax + rax]
movsxd rbp, edi
mov rdx, r12
mov rax, rbp
mov rcx, rbx
imul rax, r15
add rax, r13
mov qword [r12], rax
call fcn.1401ba480
test eax, eax
je 0x140031ee7
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x14003216a
mov eax, edi
and eax, 0x8000000f
jge 0x14003213d
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x14003216a
mov r8d, dword [rbx + 0x78]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r14d
mov rdx, rbp
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140038ca6.0]
cmp dword [rsp + 0x40], r14d
jne 0x1400320b8
mov eax, dword [rbx + 0x78]
inc edi
cmp dword [rbx + 0x98], eax
jb 0x140032100
mov rax, qword [rsi + 0x28]
mov rcx, qword [rax + 0x230]
cmp byte [rcx + 0x10], 0
je 0x1400321ae
mov dword [rsi + 0x14], r14d
mov dword [rsi + 0x10], 0xbad20011
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x1400321ae
mov rax, qword [rcx]
mov edx, 0xbad20011
mov rax, qword [rax + 0x18]
call qword [case.0x140038ca6.0]
mov rbx, qword [rsi + 0x28]
mov ecx, dword [rbx + 0x24]
lea eax, [rcx - 0xcd]
cmp eax, 1
ja 0x140032227
cmp byte [rbx + 0x58], 0
jne 0x140032227
mov eax, dword [rbx + 0x78]
cmp dword [rbx + 0x98], eax
jae 0x1400321e3
mov rax, qword [rbx]
mov rcx, rbx
mov dword [rax + 0x28], 0x43
mov rax, qword [rbx]
call qword [rax]
mov rdi, qword [rbx + 0x200]
lea rcx, [0x1401befc0]
mov rax, qword [rdi + 8]
cmp rax, rcx
jne 0x140032219
cmp byte [rbx + 0x62], 0
je 0x14003220d
mov rax, qword [rbx + 0x250]
mov rcx, rbx
call qword [rax + InitCommonControls]
inc dword [rdi + 0x78]
mov dword [rbx + 0x24], 0xd2
jmp 0x14003225b
mov rcx, rbx
call rax
mov dword [rbx + 0x24], 0xd2
jmp 0x14003225b
cmp ecx, 0xcf
jne 0x140032238
mov dword [rbx + 0x24], 0xd2
jmp 0x14003225b
cmp ecx, 0xd2
je 0x14003225b
mov rax, qword [rbx]
mov dword [rax + 0x28], ILIsEqual
mov rcx, qword [rbx]
mov eax, dword [rbx + 0x24]
mov dword [rcx + 0x2c], eax
mov rcx, rbx
mov rax, qword [rbx]
call qword [rax]
mov rax, qword [rbx + 0x220]
cmp byte [rax + 0x21], 0
jne 0x14003227e
mov rcx, rbx
call qword [rax]
test eax, eax
je 0x1400322c1
mov rax, qword [rbx + 0x220]
cmp byte [rax + 0x21], 0
je 0x140032268
mov rax, qword [rbx + 0x28]
mov rcx, rbx
call qword [rax + 0x30]
mov rax, qword [rbx + 8]
test rax, rax
je 0x1400322c1
mov edx, 1
mov rcx, rbx
call qword [rax + 0x48]
cmp byte [rbx + 0x20], 0
je 0x1400322ba
mov dword [rbx + 0x24], 0xc8
mov eax, 1
mov qword [rbx + 0x170], r14
jmp 0x140031ee9
mov dword [rbx + 0x24], 0x64
mov eax, 1
jmp 0x140031ee9