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

Disassembly:
test edx, edx
jle 0x140021879
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
mov dword [rax + 0x18], r8d
mov dword [rax + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov eax, dword [rcx + 0x8c]
mov r12d, r9d
sub eax, dword [rcx + 0x90]
mov rsi, rcx
movsxd r10, dword [rcx + 0x94]
xor r11d, r11d
mov dword [rsp + 0x5c], eax
xor edi, edi
xor ebp, ebp
call fcn.140022504
movsxd r14, dword [rsi + 0xa4]
lea rbx, [r10 + 8]
and dword [rsp + 0x58], edi
add r14, rsi
mov dword [rsp + 0x64], eax
xor r9d, r9d
mov eax, dword [rsi + 0x18]
xor ecx, ecx
neg eax
mov qword [rsp + 0x80], r14
mov dword [rsp + 0x60], eax
lea rbx, [r14 + rbx*8]
mov qword [rsp + 0x88], rbx
mov dword [rsp + 0x50], r9d
mov dword [rsp + 0x54], ecx
test edx, edx
js 0x140021800
and qword [rsp + 0x78], rcx
lea eax, [r10 + 6]
mov r13d, dword [rsp + 0xf0]
xor r15d, r15d
movsxd r10, eax
xor eax, eax
mov dword [rsp + 0x40], eax
cmp ecx, edx
mov qword [rsp + 0x70], r10
mov qword [rsp + 0x48], r15
jge 0x1400216fe
mov edx, eax
mov rcx, rsi
call fcn.140021bb8
mov ecx, dword [rsp + 0xd8]
mov r15, rax
dec ecx
cmp dword [rsp + 0x54], ecx
jl 0x14002169f
cmp dword [rsp + 0x64], 0
jne 0x140021696
mov r12d, dword [rsp + 0x40]
xor r11d, r11d
mov ecx, dword [rsp + 0x5c]
cmp r12d, ecx
jge 0x140021616
lea eax, [rcx - 1]
mov r14d, eax
mov edx, r12d
mov rcx, rsi
mov ebx, r11d
call fcn.140021bb8
mov rcx, rax
mov r11d, dword [rax + 0x3c]
cmp r11d, ebx
cmovle r11d, ebx
cmp r12d, dword [rsp + 0x40]
jne 0x1400215cc
test dword [rax + 0xf4], 0x100
je 0x1400215c7
mov eax, dword [r15 + 0x30]
neg eax
cmp dword [r15 + 0x18], eax
cmovge eax, dword [r15 + 0x18]
cmp dword [rsp + 0xf8], 0
mov edi, eax
je 0x1400215cc
cmp eax, r13d
jge 0x1400215cc
mov edi, r13d
jmp 0x1400215cc
mov edi, dword [rax + 0x30]
neg edi
cmp r12d, r14d
jne 0x1400215f8
test dword [rcx + 0xf4], 0x100
je 0x1400215f5
cmp dword [rsp + 0x100], 0
mov ebp, dword [r15 + 0x14]
je 0x1400215f8
cmp ebp, r13d
jge 0x1400215f8
mov ebp, r13d
jmp 0x1400215f8
mov ebp, dword [rcx + 0x38]
inc r12d
cmp r12d, dword [rsp + 0x5c]
jl 0x140021573
mov r14, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x88]
mov r12d, dword [rsp + 0xe8]
mov eax, r12d
sub eax, dword [rsi + 0x18]
cmp r11d, eax
je 0x1400216b6
cmp dword [rsi + 0x8c], 1
jne 0x140021657
mov ecx, dword [rsi + 0x34]
sub ecx, 3
je 0x140021691
sub ecx, 2
je 0x140021691
sub ecx, 1
je 0x14002168c
sub ecx, 6
je 0x14002168c
sub ecx, 4
je 0x140021691
cmp ecx, 6
je 0x140021691
mov r15, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x78]
mov eax, r11d
sub eax, dword [rsp + 0x60]
mov dword [rsp + 0x60], r11d
cmp dword [r14 + rcx*8 + 4], edi
jne 0x14002175c
cmp rcx, 1
jle 0x14002175c
mov r10, qword [rsp + 0x70]
jmp 0x140021789
add edi, dword [rsi + 0x7c]
jmp 0x140021657
add ebp, dword [rsi + 0x7c]
jmp 0x140021657
mov r11d, r12d
sub r11d, dword [rsi + 0x18]
jmp 0x1400216b6
mov edx, dword [rsp + 0x40]
mov rcx, rsi
add edx, dword [rsp + 0xe0]
call fcn.140021bb8
mov r11d, dword [rax + 0x34]
mov edi, dword [r15 + 0x30]
neg edi
cmp dword [r15 + 0x18], edi
cmovge edi, dword [r15 + 0x18]
cmp dword [rsp + 0xf8], 0
je 0x1400216d6
cmp edi, r13d
cmovl edi, r13d
cmp dword [rsp + 0x100], 0
mov ebp, dword [r15 + 0x14]
je 0x140021657
mov r15, qword [rsp + 0x48]
cmp ebp, r13d
jge 0x14002165c
mov ebp, r13d
jmp 0x14002165c
mov eax, r12d
sub eax, dword [rsi + 0x18]
cmp r11d, eax
jge 0x140021800
dec edx
mov rcx, rsi
imul edx, r8d
call fcn.140021bb8
mov r11d, r12d
sub r11d, dword [rsi + 0x18]
mov edi, dword [rax + 0x30]
neg edi
cmp dword [rax + 0x18], edi
cmovge edi, dword [rax + 0x18]
cmp dword [rsp + 0xf8], 0
je 0x14002173f
cmp edi, r13d
cmovl edi, r13d
cmp dword [rsp + 0x100], 0
mov ebp, dword [rax + 0x14]
je 0x14002165c
cmp ebp, r13d
cmovl ebp, r13d
jmp 0x14002165c
mov r10, qword [rsp + 0x70]
cmp rcx, r10
jg 0x14002177d
inc dword [rsp + 0x58]
inc rcx
mov qword [rsp + 0x78], rcx
mov dword [r14 + rcx*8 + 4], edi
mov dword [r14 + rcx*8], eax
jmp 0x14002178d
cmp edi, dword [r14 + rcx*8 + 4]
jle 0x140021789
mov dword [r14 + rcx*8 + 4], edi
add dword [r14 + rcx*8], eax
cmp dword [rbx + r15*8 + 4], ebp
jne 0x14002179a
cmp r15, 1
jg 0x1400217cb
cmp r15, r10
jg 0x1400217bf
mov r9d, dword [rsp + 0x50]
inc r9d
mov dword [rbx + r15*8 + 0xc], ebp
inc r15
mov dword [rsp + 0x50], r9d
mov qword [rsp + 0x48], r15
mov dword [rbx + r15*8], eax
jmp 0x1400217d4
cmp ebp, dword [rbx + r15*8 + 4]
jle 0x1400217cb
mov dword [rbx + r15*8 + 4], ebp
mov r9d, dword [rsp + 0x50]
add dword [rbx + r15*8], eax
mov ecx, dword [rsp + 0x54]
mov eax, dword [rsp + 0x40]
inc ecx
mov r8d, dword [rsp + 0xe0]
add eax, r8d
mov edx, dword [rsp + 0xd8]
mov dword [rsp + 0x54], ecx
mov dword [rsp + 0x40], eax
cmp ecx, edx
jle 0x140021527
and dword [rsp + 0x38], 0
mov eax, r12d
sub eax, dword [r14 + 8]
mov rcx, r14
mov dword [r14], eax
mov eax, dword [rsp + 0x58]
dec eax
mov qword [rsp + 0x30], rsi
and dword [rsp + 0x28], 0
mov dword [r14 + 4], eax
lea eax, [r9 - 1]
mov dword [rbx + 4], eax
mov eax, r12d
sub eax, dword [rbx + 8]
mov dword [rbx], eax
mov eax, dword [r14 + 8]
mov r9d, dword [rbx + 0xc]
mov r8d, dword [r14 + 0xc]
mov edx, dword [rsi + 0x94]
mov dword [rsp + 0x20], eax
call fcn.140020b78
mov rdx, r14
mov dword [rsi + 0x4c], r12d
mov rcx, rsi
call fcn.1400212c4
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret