Function at 0x1401f4500
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x140
mov rax, qword [0x1402d3700]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rax, qword [rcx]
movzx r12d, r9w
mov rdi, qword [rcx + 0x10]
mov r14, r8
mov word [rsp + 0x30], r9w
mov r10, rdx
mov qword [rsp + 0xa8], r8
mov r13, rcx
mov rsi, qword [rax]
xor eax, eax
mov qword [rsp + 0x70], rdx
mov ebp, eax
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x80], rsi
mov rbx, qword [rsi]
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rax
cmp dword [rsi + 0x30], eax
je 0x1401f4581
mov eax, dword [rsi + 0x18]
jmp 0x1401f4f6e
mov eax, dword [rdi + 0x38]
mov ecx, 0x18
mov r8d, dword [r8 + 0x64]
test al, 0x20
mov dword [rsp + 0x54], eax
mov eax, 0x1bf
cmove ecx, eax
mov qword [rsp + 0x138], r15
test r8d, 0x104
je 0x1401f45ce
mov edx, ecx
and edx, 0xffffffc3
test r8b, 4
cmove edx, ecx
bt r8d, 8
mov ecx, edx
jae 0x1401f45ce
test byte [r10 + 0x40], 2
jne 0x1401f45ce
and ecx, 0xffffff7c
movzx edx, word [rdi + 0x1a]
movzx eax, word [rdi + 0x18]
movzx r8d, word [rdi + 0x3e]
mov r9d, eax
mov word [rsp + 0x3e], dx
movzx edx, word [rdi + 0x1c]
mov word [rsp + 0x40], dx
movzx edx, word [rdi + 0x3c]
mov word [rsp + 0x42], dx
mov rdx, qword [rdi]
mov qword [rsp + 0xa0], rdx
movzx edx, word [rdi + 0x16]
mov word [rsp + 0x34], dx
mov rdx, qword [r13 + 8]
mov word [rsp + 0x44], r8w
mov r8d, dword [r10 + 0x44]
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0xb0]
mov word [rsp + 0x32], ax
mov dword [rsp + 0x60], eax
call fcn.1401f8e80
xor r11d, r11d
mov qword [rsp + 0x98], rax
mov word [rdi + 0x12], r11w
mov r15, rax
mov rcx, qword [r14 + 0x10]
movsx rax, word [rcx]
mov word [rsp + 0x52], ax
cmp eax, 0xa
jg 0x1401f4663
mov word [rsp + 0x3c], r11w
jmp 0x1401f4674
mov rcx, rax
call fcn.1401aebd0
sub ax, 0x21
mov word [rsp + 0x3c], ax
test r15, r15
je 0x1401f4e49
movzx r12d, word [r15 + 0x14]
mov ecx, 0x100
mov eax, dword [r13 + 0x28]
mov ebx, r11d
mov word [rsp + 0x50], r12w
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x88], eax
cmp r12w, cx
je 0x1401f46ac
test byte [r15 + 0x12], 0x80
je 0x1401f4714
movzx r9d, word [rsp + 0x32]
mov rax, qword [r14 + 8]
movsx r8, word [rax + r9*2]
test r8d, r8d
js 0x1401f46dd
mov rdx, qword [r14 + 0x18]
lea rcx, [r8 + r8*2]
mov rax, qword [rdx + 8]
test dword [rax + rcx*8 + 8], 0xf
jne 0x1401f46e3
mov ecx, 0x100
jmp 0x1401f471a
cmp r8d, 0xffffffff
jne 0x1401f471a
movzx r12d, word [rsp + 0x30]
lea rcx, [rsp + 0xb0]
call fcn.1401f93b0
mov qword [rsp + 0x98], rax
mov r15, rax
mov r11d, 0
test ebp, ebp
je 0x1401f4674
jmp 0x1401f4e49
movzx r9d, word [rsp + 0x32]
mov rax, qword [r15 + 0x28]
test qword [rdi + 8], rax
jne 0x1401f46e3
test word [r15 + 0x12], cx
je 0x1401f4732
cmp r12w, 0x10
je 0x1401f46e3
mov r10, qword [rsp + 0x70]
movzx edx, byte [r10 + 0x3c]
test dl, 0x58
je 0x1401f4762
mov rcx, qword [r15]
mov r8d, dword [rcx + 4]
test r8b, 3
je 0x1401f46e3
mov eax, dword [r10 + 0x44]
cmp dword [rcx + 0x34], eax
jne 0x1401f46e3
test dl, 0x18
je 0x1401f4762
test r8b, 2
jne 0x1401f46e3
cmp byte [r14 + 0x62], 0
je 0x1401f477f
movzx eax, word [r14 + 0x5e]
dec eax
movzx ecx, r9w
cmp ecx, eax
jne 0x1401f477f
or byte [r13 + 0x2c], 2
jmp 0x1401f4784
or byte [r13 + 0x2c], 1
mov eax, dword [rsp + 0x54]
mov dword [rdi + 0x38], eax
movzx eax, word [rsp + 0x3e]
mov word [rdi + 0x1a], ax
movzx eax, word [rsp + 0x40]
mov word [rdi + 0x1c], ax
movzx eax, word [rsp + 0x42]
mov word [rdi + 0x18], r9w
mov word [rdi + 0x3c], ax
cmp ax, word [rdi + 0x40]
jb 0x1401f47d8
mov rcx, qword [rsp + 0x68]
lea r8d, [rax + 1]
mov rdx, rdi
call fcn.1401f6900
test eax, eax
jne 0x1401f4e43
movzx r9d, word [rsp + 0x32]
xor r11d, r11d
mov r10, qword [rsp + 0x70]
movzx ecx, word [rdi + 0x3c]
mov rax, qword [rdi + 0x48]
mov qword [rax + rcx*8], r15
movzx edx, word [rdi + 0x3c]
mov rcx, qword [rsp + 0xa0]
inc dx
mov rax, qword [rdi + 8]
mov word [rdi + 0x3c], dx
not rax
or rcx, qword [r15 + 0x28]
and rcx, rax
mov qword [rdi], rcx
test r12b, 1
je 0x1401f4919
mov r8, qword [r15]
test dword [r8 + 4], 0x1000
je 0x1401f4852
movzx eax, dx
mov ebx, 0x2e
dec eax
mov dword [rsp + 0x38], ebx
test eax, eax
jle 0x1401f486e
mov rcx, qword [rdi + 0x48]
mov edx, eax
mov rax, qword [rcx]
test rax, rax
je 0x1401f4846
cmp qword [rax], r8
cmove ebx, r11d
add rcx, 8
sub rdx, 1
jne 0x1401f4837
jmp 0x1401f486a
mov rax, qword [r8 + 0x20]
test rax, rax
je 0x1401f486e
movsxd rcx, dword [rax]
test ecx, ecx
je 0x1401f486e
call fcn.1401aebd0
movsx ebx, ax
mov dword [rsp + 0x38], ebx
test byte [r14 + 0x64], 0x80
je 0x1401f48fd
movzx r10d, word [rsp + 0x3c]
cmp r10w, 0xa
jl 0x1401f48fd
mov rax, qword [r14 + 0x10]
movzx ecx, r9w
movzx r8d, word [rax + rcx*2]
cmp bx, 0xa
jg 0x1401f489f
movzx eax, r11w
jmp 0x1401f48ac
movsx rcx, bx
call fcn.1401aebd0
sub ax, 0x21
movzx r9d, word [rsp + 0x30]
sub ax, bx
sub ax, r10w
add ax, r8w
add ax, 0xa
jns 0x1401f4903
cmp r9w, 2
jge 0x1401f4e3a
mov rax, qword [rsp + 0x68]
test dword [rax + 0x60], 0x20000
jne 0x1401f4e3a
or dword [rdi + 0x38], 0x100000
or dword [rdi + 0x38], 4
mov edx, dword [rdi + 0x38]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x58]
jmp 0x1401f4a9d
movzx r9d, word [rsp + 0x30]
or dword [rdi + 0x38], 4
mov edx, dword [rdi + 0x38]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x58]
jmp 0x1401f4a9d
test r12b, 0x82
je 0x1401f49aa
mov rax, qword [r14 + 8]
movzx ecx, r9w
movzx r9d, word [rsp + 0x30]
movsx r8d, word [rax + rcx*2]
mov ecx, dword [rdi + 0x38]
or ecx, 1
mov dword [rdi + 0x38], ecx
cmp r8d, 0xffffffff
je 0x1401f4981
mov edx, ecx
test r8d, r8d
js 0x1401f498a
test r9w, r9w
jne 0x1401f498a
movzx r8d, word [r14 + 0x5e]
lea eax, [r8 - 1]
cmp dword [rsp + 0x60], eax
jne 0x1401f498a
test byte [r14 + 0x64], 8
jne 0x1401f4981
cmp r8d, 1
jne 0x1401f497b
cmp byte [r14 + 0x62], r9b
je 0x1401f497b
cmp r12w, 2
je 0x1401f4981
bts edx, 0x10
jmp 0x1401f4987
mov edx, ecx
bts edx, 0xc
mov dword [rdi + 0x38], edx
cmp byte [rsp + 0xd9], 1
jbe 0x1401f499b
bts edx, 0x15
mov dword [rdi + 0x38], edx
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x58]
jmp 0x1401f4a9d
bt r12w, 8
jae 0x1401f49ca
mov edx, dword [rdi + 0x38]
mov rax, qword [rsp + 0x48]
or edx, 8
mov rcx, qword [rsp + 0x58]
mov dword [rdi + 0x38], edx
jmp 0x1401f4a97
mov r9d, dword [rsp + 0x60]
mov r8, r14
mov edx, dword [r10 + 0x44]
mov rcx, rsi
mov qword [rsp + 0x20], r15
call fcn.1401f8b90
mov edx, dword [rdi + 0x38]
test r12b, 0x24
je 0x1401f4a63
mov word [rdi + 0x1a], ax
or edx, 0x22
xor eax, eax
mov dword [rdi + 0x38], edx
mov qword [rsp + 0x48], rax
mov eax, 0x100
mov qword [rsp + 0x58], r15
test word [r15 + 0x12], ax
je 0x1401f4a56
movzx r8d, word [rdi + 0x3c]
lea rax, [r15 + 0x38]
mov rcx, qword [rsp + 0x68]
inc r8d
mov rdx, rdi
mov qword [rsp + 0x48], rax
call fcn.1401f6900
test eax, eax
jne 0x1401f4e43
movzx ecx, word [rdi + 0x3c]
mov rax, qword [rdi + 0x48]
mov r8, qword [rsp + 0x48]
mov qword [rax + rcx*8], r8
inc word [rdi + 0x3c]
or dword [rdi + 0x38], 0x10
mov edx, dword [rdi + 0x38]
mov word [rdi + 0x1c], 1
mov rax, qword [rsp + 0x48]
mov rcx, r15
xor r11d, r11d
jmp 0x1401f4a97
or edx, 0x12
mov word [rdi + 0x1c], ax
xor r11d, r11d
mov dword [rdi + 0x38], edx
mov rax, r15
mov qword [rsp + 0x48], rax
test dl, 0x20
je 0x1401f4a8f
mov rax, qword [rdi + 0x48]
movzx ecx, word [rdi + 0x3c]
mov rcx, qword [rax + rcx*8 - 0x10]
mov rax, r15
jmp 0x1401f4a92
mov rcx, r11
mov qword [rsp + 0x58], rcx
movzx r9d, word [rsp + 0x30]
test dl, 2
je 0x1401f4abd
mov r8, rcx
mov qword [rsp + 0x20], rdi
mov rcx, rsi
mov r9, rax
mov rdx, r13
call fcn.1401f8300
jmp 0x1401f4d2c
movzx eax, word [rdi + 0x18]
inc ax
movzx esi, ax
mov word [rdi + 0x18], si
movzx edx, word [r15 + 0x10]
mov dword [rsp + 0x64], esi
test dx, dx
jg 0x1401f4af5
movzx ecx, word [rsp + 0x32]
mov rax, qword [r14 + 8]
cmp word [rax + rcx*2], 0
jl 0x1401f4af5
sub dx, bx
add word [rdi + 0x16], dx
jmp 0x1401f4d2c
mov rbx, r11
mov qword [rsp + 0x78], rbx
test r9w, r9w
jne 0x1401f4d01
cmp dword [r14 + 0x68], 0
je 0x1401f4d01
cmp esi, dword [r14 + 0x70]
jg 0x1401f4d01
test r12b, 1
je 0x1401f4b32
mov rax, qword [r15]
test dword [rax + 4], 0x1000
jne 0x1401f4d01
mov rax, qword [rsp + 0x68]
test dword [rax + 0x60], 0x800
jne 0x1401f4d01
mov rax, qword [r15]
mov ecx, 0x182
test cx, r12w
je 0x1401f4b75
mov r8, qword [rax + 0x18]
lea r9, [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
mov rdx, r13
call fcn.1401f32b0
mov rbx, qword [rsp + 0x78]
jmp 0x1401f4c1c
mov r13, qword [rax + 0x20]
mov r10, qword [rsp + 0x90]
mov rax, qword [r10 + 0x10]
mov rcx, qword [rax + 0x20]
mov rcx, qword [rcx + 0x10]
movzx ecx, word [rcx]
call fcn.1401aed60
mov r12d, dword [r10 + 0x28]
lea r14, [r13 + 8]
mov r15, rax
mov rbp, r11
mov eax, r11d
mov esi, r11d
nop dword [rax]
cmp esi, dword [r13]
jge 0x1401f4bf0
mov r8, qword [r14]
lea r9, [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
mov rdx, r10
mov qword [rsp + 0x78], r15
call fcn.1401f32b0
mov r10, qword [rsp + 0x90]
inc esi
add rbp, qword [rsp + 0x78]
add r14, 0x20
mov dword [r10 + 0x28], r12d
test eax, eax
je 0x1401f4bb0
jmp 0x1401f4bfa
cmp rbp, r15
mov rbx, rbp
cmova rbx, r15
mov esi, dword [rsp + 0x64]
mov r14, qword [rsp + 0xa8]
mov r15, qword [rsp + 0x98]
movzx r12d, word [rsp + 0x50]
mov r13, qword [rsp + 0x90]
xor r11d, r11d
cmp eax, 0xc
mov ebp, r11d
cmovne ebp, eax
test ebp, ebp
jne 0x1401f4e43
test rbx, rbx
je 0x1401f4d01
mov eax, 0x28
cmp rbx, 8
jae 0x1401f4c5f
cmp rbx, 2
jae 0x1401f4c50
movzx eax, r11w
jmp 0x1401f4caf
add ax, 0xfff6
add rbx, rbx
cmp rbx, 8
jb 0x1401f4c50
jmp 0x1401f4c9d
cmp rbx, 0xff
jbe 0x1401f4c81
nop dword [rax + rax]
add ax, 0x28
shr rbx, 4
cmp rbx, 0xff
ja 0x1401f4c70
cmp rbx, 0xf
jbe 0x1401f4c9d
nop word [rax + rax]
add ax, 0xa
shr rbx, 1
cmp rbx, 0xf
ja 0x1401f4c90
and ebx, 7
lea rcx, [0x1402cd9d0]
sub ax, 0xa
add ax, word [rcx + rbx*2]
mov word [rdi + 0x16], ax
cmp si, 1
jne 0x1401f4ce5
movsx edx, ax
mov rax, qword [r14 + 0x10]
add edx, 0xa
movsx ecx, word [rax]
cmp edx, ecx
jle 0x1401f4ce5
mov eax, 0x4000
or ax, word [r15 + 0x12]
bt ax, 0xd
mov word [r15 + 0x12], ax
jae 0x1401f4ce5
or byte [r13 + 0x2d], 4
movzx eax, word [rdi + 0x16]
cmp ax, word [rsp + 0x34]
mov esi, dword [rsp + 0x38]
cmovg ax, word [rsp + 0x34]
sub ax, si
mov word [rdi + 0x16], ax
jmp 0x1401f4d30
mov rax, qword [r14 + 0x10]
movzx ecx, si
movzx edx, word [rax + rcx*2]
sub dx, word [rax + rcx*2 - 2]
add dx, word [rdi + 0x16]
bt r12w, 8
mov word [rdi + 0x16], dx
movzx eax, dx
jae 0x1401f4d2c
add ax, 0xa
mov word [rdi + 0x16], ax
mov esi, dword [rsp + 0x38]
mov eax, dword [r14 + 0x64]
movzx ebx, word [rdi + 0x16]
and eax, 3
mov r15, qword [rsp + 0x70]
cmp al, 3
jne 0x1401f4d49
lea eax, [rbx + 0x10]
jmp 0x1401f4d64
movsx eax, word [r14 + 0x5c]
mov rcx, qword [r15 + 0x20]
imul eax, eax, 0xf
movsx r8d, word [rcx + 0x3c]
cdq
idiv r8d
inc ax
add ax, bx
movzx ecx, word [rsp + 0x3c]
movzx edx, ax
call fcn.1401aec60
test dword [rdi + 0x38], 0x4000140
movzx ecx, ax
jne 0x1401f4d88
lea edx, [rbx + 0x10]
call fcn.1401aec60
movzx ecx, ax
movzx r12d, word [rsp + 0x30]
lea eax, [rsi + rbx]
movzx r8d, word [rsp + 0x52]
add cx, si
add cx, r12w
add ax, r12w
mov word [rdi + 0x14], cx
mov rdx, rdi
mov word [rdi + 0x16], ax
mov rcx, qword [r13 + 8]
call fcn.1401f66d0
mov rdx, rdi
mov rcx, r13
call fcn.1401f6300
mov ecx, dword [rdi + 0x38]
mov ebp, eax
test cl, 2
cmovne bx, word [rsp + 0x34]
mov word [rdi + 0x16], bx
test cl, 0x10
jne 0x1401f4e19
movzx ecx, word [rdi + 0x18]
cmp cx, word [r14 + 0x60]
jae 0x1401f4e19
cmp cx, word [r14 + 0x5e]
jb 0x1401f4df4
mov eax, dword [r14 + 0x64]
and al, 3
cmp al, 2
je 0x1401f4e19
cmp cx, 3
jbe 0x1401f4e07
mov rcx, qword [rsp + 0x80]
call fcn.1401b99f0
lea r9d, [rsi + r12]
mov r8, r14
mov rdx, r15
mov rcx, r13
call fcn.1401f4500
movzx ecx, word [rsp + 0x34]
mov eax, dword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov word [rdi + 0x16], cx
mov dword [r13 + 0x28], eax
jmp 0x1401f46e9
movzx r12d, r9w
jmp 0x1401f46e9
movzx r12d, word [rsp + 0x30]
mov rax, qword [rsp + 0xa0]
movzx esi, word [rsp + 0x32]
movzx ecx, word [rsp + 0x44]
movzx r15d, word [rsp + 0x34]
movzx edx, word [rsp + 0x42]
mov qword [rdi], rax
movzx eax, word [rsp + 0x3e]
mov word [rdi + 0x1a], ax
movzx eax, word [rsp + 0x40]
mov word [rdi + 0x1c], ax
mov eax, dword [rsp + 0x54]
mov dword [rdi + 0x38], eax
mov word [rdi + 0x18], si
mov word [rdi + 0x3e], cx
mov word [rdi + 0x16], r15w
mov word [rdi + 0x3c], dx
cmp si, cx
jne 0x1401f4f64
movzx ecx, word [r14 + 0x5e]
lea eax, [rsi + 1]
cmp eax, ecx
jae 0x1401f4f64
cmp si, dx
jne 0x1401f4f64
mov eax, dword [r14 + 0x64]
test al, 0x40
jne 0x1401f4f64
test al, al
jns 0x1401f4f64
mov rcx, qword [rsp + 0x68]
test dword [rcx + 0x60], 0x4000
jne 0x1401f4f64
mov rax, qword [r14 + 0x10]
cmp word [rax + rsi*2 + 2], 0x2a
jl 0x1401f4f64
lea r8d, [rdx + 1]
mov rdx, rdi
call fcn.1401f6900
mov ebp, eax
test eax, eax
jne 0x1401f4f64
inc word [rdi + 0x18]
mov r8, r14
inc word [rdi + 0x3e]
movzx ecx, word [rdi + 0x3c]
mov rax, qword [rdi + 0x48]
mov rdx, qword [rsp + 0x70]
mov qword [rax + rcx*8], 0
mov rcx, r13
inc word [rdi + 0x3c]
or dword [rdi + 0x38], 0x8000
mov rax, qword [r14 + 0x10]
movzx r9d, word [rax + rsi*2]
sub r9w, word [rax + rsi*2 + 2]
sub word [rdi + 0x16], r9w
add r9w, 5
add r9w, r12w
call fcn.1401f4500
movzx r8d, word [rsp + 0x44]
mov eax, dword [rsp + 0x54]
mov word [rdi + 0x3e], r8w
mov word [rdi + 0x16], r15w
mov word [rdi + 0x18], si
mov dword [rdi + 0x38], eax
mov r15, qword [rsp + 0x138]
mov eax, ebp
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.14025e200
add rsp, 0x140
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret