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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rbx, rdx
mov r12d, r8d
add rdx, 0x1218d6
mov r15, rcx
test byte [rbx + 0x12191c], 1
je 0x140058f79
movzx eax, word [rbx + 0x121920]
add ax, ax
add word [rdx], ax
movzx ecx, word [rdx]
movzx eax, word [rbx + 0x121920]
add ecx, 7
and cx, 0xfff8
add ax, ax
add word [rbx + 0x1218d0], ax
mov word [rdx], cx
jmp 0x140058f89
movzx eax, word [rdx]
add eax, 7
and ax, 0xfff8
mov word [rdx], ax
movzx ecx, ax
movzx eax, word [rbx + 0x1218d0]
inc eax
shr eax, 1
add ax, ax
mov word [rbx + 0x1218d0], ax
cmp cx, ax
jae 0x140058fa6
mov word [rdx], ax
xor r13d, r13d
cmp dword [0x14017adb0], r13d
lea eax, [r13 + 0x10]
lea r14d, [r13 + 0x20]
je 0x140058fe9
cmp dword [r15], r13d
jne 0x140058fe9
cmp dword [0x14017af0c], r13d
jne 0x140058fe9
test byte [rbx + 0x12191c], 2
lea ecx, [rax - 0xf]
mov dword [rbx + 0x12221c], 1
je 0x140058ff3
cmp dword [r15 + 4], r13d
jne 0x140058ff3
mov eax, r14d
jmp 0x140058ff3
mov ecx, r13d
mov dword [rbx + 0x12221c], r13d
mov dword [rbx + 0x1221f0], eax
mov ebp, 0x7e8
mov eax, dword [r15 + 0xc]
mov r8d, 0x2000
mov qword [rsp + 0x80], rsi
mov dword [rbx + 0x1221f4], eax
mov qword [rbx + 0x122208], r13
mov qword [rbx + 0x122210], r13
mov dword [rbx + 0x122218], r13d
mov qword [rsp + 0x88], rdi
cmp ecx, 1
jne 0x14005941b
nop dword [rax]
mov eax, dword [0x14017aeec]
imul eax, dword [0x14017aee8]
mov r10d, dword [0x14017adf0]
imul ecx, eax, 0x55
mov eax, 0x51eb851f
imul ecx
mov r11d, edx
sar r11d, 5
mov eax, r11d
shr eax, 0x1f
add r11d, eax
test byte [rbx + 0x12191c], 1
je 0x140059083
mov eax, r10d
cdq
sub eax, edx
sar eax, 1
mov edi, eax
jmp 0x140059086
mov edi, r10d
movzx esi, word [rbx + 0x1218d6]
cmp edi, r8d
mov eax, 8
mov dword [rbx + 0x121d70], 8
cmovg edi, r8d
mov dword [rbx + 0x121d74], 8
cmp r10d, r8d
cmovg r10d, r8d
xor edx, edx
div esi
mov r9d, eax
imul r9d, r9d
cmp r9d, ebp
jge 0x140059137
mov ecx, 8
mov r8d, ecx
nop dword [rax]
mov eax, dword [r15 + 8]
test eax, eax
jle 0x1400590dd
cmp r9d, eax
jmp 0x1400590ec
mov eax, r8d
imul eax, ecx
cmp eax, r11d
jl 0x1400590ee
cmp r9d, 0xa
jge 0x14005913a
cmp r8d, edi
jl 0x140059102
cmp ecx, r10d
jge 0x14005913a
add ecx, ecx
mov dword [rbx + 0x121d74], ecx
jmp 0x140059120
cmp ecx, r10d
jge 0x140059116
cmp r8d, ecx
jle 0x140059116
add ecx, ecx
mov dword [rbx + 0x121d74], ecx
jmp 0x140059120
add r8d, r8d
mov dword [rbx + 0x121d70], r8d
mov eax, r8d
cdq
idiv esi
mov r9d, eax
mov eax, ecx
cdq
idiv esi
imul r9d, eax
cmp r9d, ebp
jl 0x1400590d0
mov r9d, ebp
mov eax, dword [rbx + 0x121d74]
lea rdi, [rbx + 0x121da8]
movzx ecx, word [rbx + 0x1218d6]
cdq
mov ebp, dword [rbx + 0x12191c]
mov esi, 0xff
idiv ecx
mov dword [rbx + 0x11dbe4], r9d
mov dword [rbx + 0x121d78], eax
mov eax, ebp
and eax, 2
and ebp, 1
cmp dword [0x14017add8], r13d
je 0x1400592b0
mov dword [rdi], r13d
mov word [rdi + 4], 0x801
mov dword [rdi + 0x24], esi
mov dword [rdi + 0x20], 0xff000000
mov word [rdi + 0xe], r13w
mov qword [rdi + 0x18], rsi
mov word [rdi + 0xb], 0x1000
mov dword [rdi + 0x10], 0xff0000
mov word [rdi + 8], 0x808
mov byte [rdi + 0xd], 8
mov dword [rdi + 0x14], 0xff00
mov byte [rdi + 0xa], 8
test byte [rbx + 0x12191c], 2
je 0x14005923f
cmp dword [rbx + 0x90], r13d
je 0x1400591dc
mov eax, dword [rbx + 0xc0]
sub eax, 7
cmp eax, 1
ja 0x14005923f
cmp dword [rbx + 0x1221f4], r13d
je 0x14005920d
mov eax, r13d
lea rcx, [rdi + 0x29]
nop dword [rax]
mov byte [rcx + 1], al
mov byte [rcx], al
mov byte [rcx - 1], al
mov byte [rcx + 2], al
lea rcx, [rcx + 4]
inc eax
cmp eax, 0x100
jl 0x1400591f0
jmp 0x14005936a
mov ecx, r13d
lea rax, [rdi + 0x29]
nop dword [rax]
nop dword [rax + rax]
mov byte [rax + 2], cl
inc ecx
mov word [rax], 0xffff
mov byte [rax - 1], sil
lea rax, [rax + 4]
cmp ecx, 0x100
jl 0x140059220
jmp 0x14005936a
mov dword [rdi + 0x24], 0xf
cmp dword [rbx + 0x1221f4], r13d
je 0x14005927e
mov eax, r13d
lea rcx, [rdi + 0x29]
nop word [rax + rax]
mov byte [rcx + 1], al
mov byte [rcx], al
mov byte [rcx - 1], al
mov byte [rcx + 2], al
lea rcx, [rcx + 4]
add eax, 0x11
cmp eax, 0x110
jl 0x140059260
jmp 0x14005936a
mov ecx, r13d
lea rax, [rdi + 0x29]
nop word [rax + rax]
mov byte [rax + 2], cl
add ecx, 0x11
mov word [rax], 0xffff
mov byte [rax - 1], sil
lea rax, [rax + 4]
cmp ecx, 0x110
jl 0x140059290
jmp 0x14005936a
test eax, eax
mov byte [rsp + 0x33], r13b
lea rcx, [rsp + 0x30]
mov word [rsp + 0x3d], r13w
setne byte [rsp + 0x32]
mov byte [rsp + 0x3b], r13b
test eax, eax
mov byte [rsp + 0x38], r13b
mov eax, pe_nt_image_headers64
sete byte [rsp + 0x3a]
cmp dword [rbx + 0x1221f0], 0x10
cmove r14d, eax
mov byte [rsp + 0x3c], r14b
call fcn.140013d50
mov ecx, eax
call fcn.14000adf0
mov rcx, rdi
mov edx, 8
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rax]
lea rax, [rax + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm1, xmmword [rax - 0x70]
movups xmmword [rcx - 0x70], xmm1
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx - 0x60], xmm0
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx - 0x50], xmm1
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx - 0x40], xmm0
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx - 0x30], xmm1
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx - 0x20], xmm0
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x140059301
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
mov rax, qword [rax + 0x20]
mov qword [rcx + 0x20], rax
movzx eax, byte [rdi + 4]
lea ecx, [rbp + 1]
mov qword [rdi + 0x440], r13
lea r8, str.D:DocumentsdevelopmentDxLibMakeDxFont.cpp
imul ecx, dword [rbx + 0x121d70]
mov r9d, 0x175f
imul eax, ecx
mov dword [rdi + 0x428], ecx
movsxd rdx, dword [rbx + 0x121d74]
mov dword [rdi + 0x42c], edx
movsxd rcx, eax
imul rcx, rdx
mov dword [rdi + 0x430], eax
call fcn.140075550
mov qword [rdi + 0x438], rax
test rax, rax
je 0x1400595db
cmp dword [0x14017add8], r13d
je 0x1400593d2
mov esi, r13d
jmp 0x1400593dd
cmp dword [rbx + 0x1221f4], r13d
cmovne esi, r13d
mov r9d, esi
mov dword [rsp + 0x20], r13d
mov r8d, esi
mov edx, esi
mov rcx, rdi
call fcn.140066dd0
mov edx, r12d
mov dword [rbx + 0x121da4], 1
mov rcx, rbx
call fcn.140050e90
test eax, eax
jns 0x140059502
mov dword [rbx + 0x12221c], r13d
mov ebp, 0x7e8
movsxd rax, dword [rbx + 0x12191c]
mov r8d, r13d
cmp eax, 0x33
ja case.0x140059443.4
lea rdx, [0x140000000]
movzx eax, byte [rdx + rax + 0x59614]
mov ecx, dword [rdx + rax*4 + 0x59608]
add rcx, rdx
jmp rcx
mov r8d, 1
jmp case.0x140059443.4
mov r8d, 8
mov r9d, dword [r15 + 8]
test r9d, r9d
jne 0x14005947e
movzx ecx, word [rbx + 0x1218d6]
mov eax, 0x50000
imul ecx, ecx
cdq
idiv ecx
mov r9d, eax
cmp eax, 0x14
jge 0x14005947e
mov r9d, 0x14
jmp 0x140059485
cmp r9d, ebp
cmovg r9d, ebp
movzx ecx, word [rbx + 0x1218d6]
imul r9d, ecx
mov dword [rbx + 0x121d70], ecx
mov dword [rbx + 0x11dbf4], r8d
mov eax, r9d
mov dword [rbx + 0x121d74], r9d
cdq
idiv ecx
imul ecx, r8d
lea r8, str.D:DocumentsdevelopmentDxLibMakeDxFont.cpp
mov dword [rbx + 0x11dbe4], eax
mov dword [rbx + 0x121d78], eax
add ecx, 7
shr ecx, 3
mov dword [rbx + 0x11dbf0], ecx
imul ecx, r9d
mov r9d, 0x17b3
movsxd rcx, ecx
call fcn.140075550
mov qword [rbx + 0x11dbe8], rax
test rax, rax
je 0x1400595db
mov edx, r12d
mov rcx, rbx
call fcn.140050e90
test eax, eax
js 0x1400595db
movzx eax, word [rbx + 0x1218d6]
lea r8, str.D:DocumentsdevelopmentDxLibMakeDxFont.cpp
add eax, 4
mov r9d, 0x17c4
imul eax, eax
mov ecx, eax
mov dword [rbx + 0x121d88], ecx
call fcn.140075550
mov qword [rbx + 0x121d80], rax
test rax, rax
je 0x1400595db
mov rdx, rbx
call fcn.1400d27b0
test eax, eax
js 0x1400595db
lea rcx, [rbx + 0x1bbd8]
xor edx, edx
mov r8d, 0x100000
call fcn.140123da0
lea rdi, [rbx + 0xe0]
xor edx, edx
mov rcx, rdi
mov r8d, 0x1baf8
call fcn.140123da0
lea rcx, [rbx + 0x11bbe0]
xor edx, edx
mov r8d, 0x2000
call fcn.140123da0
mov ecx, r13d
mov dword [rbx + 0x11bbd8], r13d
cmp dword [rbx + 0x11dbe4], r13d
jle 0x1400595c9
nop dword [rax + rax]
mov dword [rdi + 0x14], ecx
mov eax, ecx
cdq
idiv dword [rbx + 0x121d78]
mov dword [rdi + 0x18], eax
mov eax, ecx
cdq
inc ecx
idiv dword [rbx + 0x121d78]
mov dword [rdi + 0x1c], edx
add rdi, 0x38
cmp ecx, dword [rbx + 0x11dbe4]
jl 0x1400595a0
mov dword [rdi + 0x14], 0xffffffff
xor eax, eax
mov dword [rbx + 0x11dbe0], r13d
jmp 0x1400595e0
mov eax, 0xffffffff
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rbp
ret