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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov ebx, r8d
mov rsi, rdx
mov r15, rcx
mov edi, r8d
test r8d, r8d
jle 0x140060a1f
mov ecx, edi
and ecx, 3
cmp ebx, 4
jae 0x1400609b2
xor eax, eax
jmp 0x1400609e8
mov edx, edi
and edx, 0xfffffffc
lea r8, [rsi + 0x5c]
xor eax, eax
nop dword [rax]
mov dword [r8 - 0x48], eax
lea r9d, [rax + 1]
mov dword [r8 - 0x30], r9d
lea r9d, [rax + 2]
mov dword [r8 - 0x18], r9d
lea r9d, [rax + 3]
mov dword [r8], r9d
add rax, 4
add r8, 0x60
cmp rax, rdx
jne 0x1400609c0
test rcx, rcx
je 0x140060a1f
lea rdx, [rax + rax*2]
lea rdx, [rsi + rdx*8]
add rdx, 0x14
shl rcx, 3
lea rcx, [rcx + rcx*2]
xor r8d, r8d
nop word cs:[rax + rax]
mov dword [rdx + r8], eax
inc eax
add r8, 0x18
cmp rcx, r8
jne 0x140060a10
movsxd rax, ebx
mov qword [rsp + 0x60], rax
cmp ebx, 2
jb 0x140060a47
lea r9, [0x1400693c0]
mov r8d, 0x18
mov rcx, rsi
mov rdx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
test ebx, ebx
jle 0x140060f20
lea rbp, [r15 + 0x18]
xor r10d, r10d
movabs r11, 0x7fffffff7fffffff
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x70], rdi
mov dword [rsp + 0x50], ebx
jmp 0x140060a95
mov qword [rsi + r14*8 + 0xc], 0
inc r10
cmp r10, rdi
je 0x140060f20
lea r14, [r10 + r10*2]
mov r9d, dword [rsi + r14*8 + 4]
test r9d, r9d
je 0x140060a80
mov ecx, dword [rsi + r14*8 + 8]
mov rax, rcx
mov qword [rsp + 0x40], rcx
test ecx, ecx
je 0x140060a80
mov r13d, dword [r15]
mov r8d, dword [r15 + 8]
lea ecx, [r9 + r8]
dec ecx
mov eax, ecx
cdq
idiv r8d
sub ecx, edx
cmp ecx, r13d
jg 0x140060ef0
mov eax, dword [r15 + 4]
mov dword [rsp + 0x3c], eax
cmp eax, dword [rsp + 0x40]
jl 0x140060ef0
mov qword [rsp + 0x88], r14
mov qword [rsp + 0x90], r10
mov r14, qword [rbp]
mov r12d, dword [r14]
lea r10d, [r12 + rcx]
cmp r10d, r13d
mov qword [rsp + 0x80], r9
jle 0x140060b3e
mov r8d, dword [r15 + 0x10]
xor eax, eax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x2c], 0x40000000
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x24], 0
cmp r8d, 1
je 0x140060ccd
jmp 0x140060e13
mov r8d, dword [r15 + 0x10]
mov dword [rsp + 0x2c], 0x40000000
mov qword [rsp + 0x58], r12
xor eax, eax
mov qword [rsp + 0x30], rax
mov rsi, r14
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x54], r8d
mov dword [rsp + 0x24], r13d
jmp 0x140060bab
mov eax, dword [rsp + 0x28]
cmp edx, eax
cmovl eax, edx
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x30]
cmovl rax, rbp
mov qword [rsp + 0x30], rax
mov r13d, dword [rsp + 0x24]
mov rbp, rsi
mov rsi, qword [rsi + 8]
add rbp, 8
mov r12d, dword [rsi]
lea r10d, [r12 + rcx]
cmp r10d, r13d
jg 0x140060c95
test ecx, ecx
jle 0x140060c40
xor r15d, r15d
mov edi, r12d
xor r11d, r11d
xor r9d, r9d
mov rbx, rsi
jmp 0x140060c0a
mov rbx, qword [rbx + 8]
mov r8d, dword [rbx]
mov r13d, r8d
sub r13d, edi
lea edi, [r11 + r13]
mov eax, ecx
sub eax, r11d
cmp edi, ecx
cmovle eax, r13d
mov r13d, r9d
sub r13d, edx
imul r13d, eax
mov edx, r9d
add r15d, r13d
add r11d, eax
mov edi, r8d
mov r9d, edx
cmp r8d, r10d
jge 0x140060c45
mov edx, dword [rbx + 4]
mov r13d, edx
sub r13d, r9d
jle 0x140060bd0
imul r13d, r11d
mov rbx, qword [rbx + 8]
mov r8d, dword [rbx]
mov eax, r8d
cmp edi, r12d
jge 0x140060c30
sub eax, r12d
jmp 0x140060bf9
sub eax, edi
jmp 0x140060bf9
xor edx, edx
xor r15d, r15d
mov r8d, dword [rsp + 0x54]
test r8d, r8d
je 0x140060b70
mov rax, qword [rsp + 0x40]
add eax, edx
cmp eax, dword [rsp + 0x3c]
mov r13d, dword [rsp + 0x24]
jg 0x140060b90
cmp edx, dword [rsp + 0x28]
jl 0x140060c80
jne 0x140060b90
cmp r15d, dword [rsp + 0x2c]
jge 0x140060b90
mov eax, edx
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x2c], r15d
jmp 0x140060b90
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x140060caa
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rsp + 0x24], eax
jmp 0x140060cb9
xor eax, eax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x24], 0
mov rbp, qword [rsp + 0x48]
mov r12, qword [rsp + 0x58]
cmp r8d, 1
jne 0x140060e13
mov rdi, r14
cmp r12d, ecx
jge 0x140060d16
mov rdi, r14
nop dword [rax + rax]
mov rdi, qword [rdi + 8]
cmp dword [rdi], ecx
jl 0x140060ce0
jmp 0x140060d16
mov eax, r12d
mov dword [rsp + 0x28], r12d
mov rax, rbp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x24], ebx
mov dword [rsp + 0x2c], r10d
mov rdi, qword [rdi + 8]
test rdi, rdi
je 0x140060e13
mov r15d, dword [rdi]
mov ebx, r15d
sub ebx, ecx
mov rax, rbp
mov rdx, r14
nop word cs:[rax + rax]
mov r14, rdx
mov rbp, rax
lea rax, [rdx + 8]
mov rdx, qword [rdx + 8]
cmp dword [rdx], ebx
jle 0x140060d30
mov esi, dword [r14]
xor r12d, r12d
mov r10d, 0
cmp esi, r15d
jge 0x140060dd0
xor r10d, r10d
xor edx, edx
xor r9d, r9d
mov r11, r14
jmp 0x140060d98
mov r11, qword [r11 + 8]
mov r8d, dword [r11]
mov r13d, r8d
sub r13d, esi
lea esi, [rdx + r13]
mov eax, ecx
sub eax, edx
cmp esi, ecx
cmovle eax, r13d
mov r13d, r9d
sub r13d, r12d
imul r13d, eax
mov r12d, r9d
add r10d, r13d
add edx, eax
mov esi, r8d
mov r9d, r12d
cmp r8d, r15d
jge 0x140060dd0
mov r12d, dword [r11 + 4]
mov r13d, r12d
sub r13d, r9d
jle 0x140060d60
imul r13d, edx
mov r11, qword [r11 + 8]
mov r8d, dword [r11]
mov eax, r8d
cmp esi, ebx
jge 0x140060dc0
sub eax, ebx
jmp 0x140060d88
sub eax, esi
jmp 0x140060d88
mov rax, qword [rsp + 0x40]
add eax, r12d
cmp eax, dword [rsp + 0x3c]
jg 0x140060d09
cmp r12d, dword [rsp + 0x28]
jg 0x140060d09
jl 0x140060cf0
cmp r10d, dword [rsp + 0x2c]
jl 0x140060cf0
jne 0x140060d09
cmp ebx, dword [rsp + 0x24]
jl 0x140060cf0
jmp 0x140060d09
cmp qword [rsp + 0x30], 0
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x70]
mov ebx, dword [rsp + 0x50]
mov r15, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x48]
mov r10, qword [rsp + 0x90]
movabs r11, 0x7fffffff7fffffff
mov r14, qword [rsp + 0x88]
mov r12, qword [rsp + 0x80]
je 0x140060ef0
mov rcx, qword [rsp + 0x40]
add ecx, dword [rsp + 0x28]
cmp ecx, dword [rsp + 0x3c]
jg 0x140060ef0
mov rax, rcx
mov rcx, qword [r15 + 0x20]
test rcx, rcx
je 0x140060ef0
mov r9d, dword [rsp + 0x24]
mov dword [rcx], r9d
mov dword [rcx + 4], eax
mov rax, qword [rcx + 8]
mov qword [r15 + 0x20], rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [r8]
cmp dword [rdx], r9d
jge 0x140060ea6
mov rax, qword [rdx + 8]
add rdx, 8
mov r8, rdx
mov rdx, rax
mov qword [r8], rcx
mov r8, qword [rdx + 8]
add r12d, dword [rsp + 0x24]
test r8, r8
je 0x140060efa
lea r9, [rdx + 8]
nop dword [rax + rax]
cmp dword [r8], r12d
jg 0x140060efa
mov rax, r8
mov r8, qword [r15 + 0x20]
mov qword [r9], r8
mov qword [r15 + 0x20], rdx
lea r9, [rax + 8]
mov r8, qword [rax + 8]
mov rdx, rax
test r8, r8
jne 0x140060ec0
jmp 0x140060efd
mov qword [rsi + r14*8 + 0xc], r11
jmp 0x140060a89
mov rax, rdx
mov qword [rcx + 8], rax
cmp dword [rax], r12d
jge 0x140060f09
mov dword [rax], r12d
mov eax, dword [rsp + 0x24]
mov dword [rsi + r14*8 + 0xc], eax
mov eax, dword [rsp + 0x28]
mov dword [rsi + r14*8 + 0x10], eax
jmp 0x140060a89
cmp ebx, 2
jb 0x140060f40
lea r9, [0x1400693f0]
mov r8d, 0x18
mov rcx, rsi
mov rdx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
test ebx, ebx
jle 0x140060f94
shl rdi, 3
lea rax, [rdi + rdi*2]
mov ecx, 1
xor edx, edx
xor r8d, r8d
jmp 0x140060f81
xor r9d, r9d
cmp dword [rsi + r8 + 0x10], 0x7fffffff
setne r9b
cmove ecx, edx
mov dword [rsi + r8 + 0x14], r9d
add r8, 0x18
cmp rax, r8
je 0x140060f94
cmp dword [rsi + r8 + 0xc], 0x7fffffff
je 0x140060f60
mov r9d, 1
jmp 0x140060f73
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret