Function at 0x140021840
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
movsxd r13, dword [rdx + 0x34]
mov rbp, rdx
mov rax, qword [rcx]
mov rbx, rcx
mov esi, dword [rdx + 0x38]
mov qword [rsp + 0x20], rax
add esi, r13d
movsx eax, word [rdx + 0x110]
mov word [rsp + 0x80], ax
mov dword [rsp + 0x88], eax
mov eax, dword [rdx + 0x80]
mov dword [rsp + 0x90], eax
mov eax, 1
mov dword [rsp + 0x98], r13d
test r13d, r13d
jne 0x1400218a4
test esi, esi
jle 0x1400218a4
add esi, eax
mov eax, dword [rcx + 0x90]
lea ecx, [rax + rax*2]
mov eax, dword [rdx + 0x3c]
shl ecx, 3
lea rdx, [rsp + 0x90]
sub eax, ecx
movsxd r15, ecx
add r15, qword [rbx + 0x88]
mov rcx, rbx
movsxd r14, eax
and r14, 0xfffffffffffffff8
call fcn.14002089c
xor r9d, r9d
mov r10d, 0x80
cmp byte [rbp + 0x20], r9b
je 0x1400218ee
mov ecx, r10d
cmp byte [rbp + 0x21], r9b
jne 0x1400218f1
mov ecx, r9d
mov eax, dword [rbx + 0xc8]
btr eax, 7
or eax, ecx
mov dword [rbx + 0xc8], eax
cmp byte [rbp + 0x113], r9b
je 0x140021916
mov ecx, 0xa
cmp esi, ecx
cmovl esi, ecx
and eax, 0xfffffffc
mov rdx, r9
mov dword [rbx + 0xc8], eax
movsxd rax, esi
imul r12, rax, 0x38
cmp r12, r14
jg 0x14002193c
mov rdx, r14
mov rdi, r9
sub rdx, r12
add rdx, r15
jmp 0x14002193f
mov rdi, r12
movsxd r8, dword [rsp + 0x88]
mov rcx, r14
sub rcx, r12
mov qword [rbx + 0x68], rdx
cmp r12, r14
mov rdx, r9
cmovg rcx, r14
imul rax, r8, 0x38
mov qword [rsp + 0x28], rax
cmp rax, rcx
jg 0x140021972
sub rcx, rax
lea rdx, [rcx + r15]
jmp 0x140021975
add rdi, rax
movsxd r14, dword [rsp + 0x90]
mov rax, r9
shl r14, 3
mov qword [rbx + 0x80], rdx
cmp r14, rcx
jg 0x14002199b
mov rax, rcx
sub rax, r14
add rax, r15
jmp 0x14002199e
add rdi, r14
mov rdx, rcx
mov qword [rbx + 0x70], rax
sub rdx, r14
mov rax, r9
cmp r14, rcx
cmovg rdx, rcx
shl r13, 3
cmp r13, rdx
jg 0x1400219c6
mov rax, r15
sub rax, r13
add rax, rdx
jmp 0x1400219c9
add rdi, r13
mov r15, qword [rsp + 0x20]
mov qword [rbx + 0x78], rax
test rdi, rdi
je 0x140021a78
mov rdx, rdi
mov rcx, r15
call fcn.140003fcc
xor r9d, r9d
mov qword [rbx + 0xf8], rax
mov rcx, rax
cmp byte [r15 + 0x61], r9b
jne 0x140021a6a
mov rax, qword [rbx + 0x68]
test rax, rax
jne 0x140021a0e
cmp r12, rdi
jg 0x140021a0e
sub rdi, r12
lea rax, [rdi + rcx]
mov qword [rbx + 0x68], rax
mov rax, qword [rbx + 0x80]
test rax, rax
jne 0x140021a2f
mov rdx, qword [rsp + 0x28]
cmp rdx, rdi
jg 0x140021a2f
sub rdi, rdx
lea rax, [rdi + rcx]
mov qword [rbx + 0x80], rax
mov rax, qword [rbx + 0x70]
test rax, rax
jne 0x140021a4b
cmp r14, rdi
jg 0x140021a4b
sub rdi, r14
lea rax, [rdi + rcx]
mov qword [rbx + 0x70], rax
mov rax, qword [rbx + 0x78]
test rax, rax
jne 0x140021a66
cmp r13, rdi
jg 0x140021a66
mov rax, rcx
sub rax, r13
add rax, rdi
mov qword [rbx + 0x78], rax
mov r8d, dword [rsp + 0x88]
mov r10d, 0x80
mov rax, qword [rbp + 0x128]
mov edi, 1
mov qword [rbx + 0xb0], rax
movzx ecx, byte [rbp + 0x113]
shl ecx, 2
mov qword [rbp + 0x128], r9
mov eax, dword [rbx + 0xc8]
xor ecx, eax
and ecx, 0xc
xor ecx, eax
mov dword [rbx + 0xc8], ecx
cmp byte [r15 + 0x61], r9b
je 0x140021ac1
and qword [rbx + 0x28], 0
mov word [rbx + 0x20], r9w
jmp 0x140021b34
mov eax, dword [rsp + 0x98]
mov dword [rbx + 0x2c], eax
movzx eax, word [rsp + 0x80]
mov word [rbx + 0x20], ax
mov rax, qword [rbx + 0x80]
test r8d, r8d
jle 0x140021afe
add rax, 8
sub r8d, edi
mov qword [rax + 0x20], r15
mov word [rax], di
mov dword [rax + 0x18], r9d
lea rax, [rax + 0x38]
test r8d, r8d
jg 0x140021ae7
mov rax, qword [rbx + 0x68]
mov dword [rbx + 0x28], esi
test esi, esi
jle 0x140021b23
add rax, 8
sub esi, edi
mov qword [rax + 0x20], r15
mov word [rax], r10w
mov dword [rax + 0x18], r9d
lea rax, [rax + 0x38]
test esi, esi
jg 0x140021b0d
mov rcx, qword [rbx + 0x78]
mov r8, r13
xor edx, edx
call sub.ntdll.dll_memset
xor r9d, r9d
or dword [rbx + 0x34], 0xffffffff
and qword [rbx + 0x38], 0
mov dword [rbx + 0x24], 0x2df20da3
mov word [rbx + 0xc2], 0xff02
mov dword [rbx + 0x30], edi
mov dword [rbx + 0x40], r9d
mov qword [rbx + 0x50], r9
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret