Function at 0x140035f70
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 0x14003600f
mov ecx, edi
and ecx, 3
cmp ebx, 4
jae 0x140035fa2
xor eax, eax
jmp 0x140035fd8
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 0x140035fb0
test rcx, rcx
je 0x14003600f
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 0x140036000
movsxd rax, ebx
mov qword [rsp + 0x60], rax
cmp ebx, 2
jb 0x140036037
lea r9, [0x14003c560]
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 0x140036510
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 0x140036085
mov qword [rsi + r14*8 + 0xc], 0
inc r10
cmp r10, rdi
je 0x140036510
lea r14, [r10 + r10*2]
mov r9d, dword [rsi + r14*8 + 4]
test r9d, r9d
je 0x140036070
mov ecx, dword [rsi + r14*8 + 8]
mov rax, rcx
mov qword [rsp + 0x40], rcx
test ecx, ecx
je 0x140036070
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 0x1400364e0
mov eax, dword [r15 + 4]
mov dword [rsp + 0x3c], eax
cmp eax, dword [rsp + 0x40]
jl 0x1400364e0
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 0x14003612e
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 0x1400362bd
jmp 0x140036403
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 0x14003619b
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 0x140036285
test ecx, ecx
jle 0x140036230
xor r15d, r15d
mov edi, r12d
xor r11d, r11d
xor r9d, r9d
mov rbx, rsi
jmp 0x1400361fa
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 0x140036235
mov edx, dword [rbx + 4]
mov r13d, edx
sub r13d, r9d
jle 0x1400361c0
imul r13d, r11d
mov rbx, qword [rbx + 8]
mov r8d, dword [rbx]
mov eax, r8d
cmp edi, r12d
jge 0x140036220
sub eax, r12d
jmp 0x1400361e9
sub eax, edi
jmp 0x1400361e9
xor edx, edx
xor r15d, r15d
mov r8d, dword [rsp + 0x54]
test r8d, r8d
je 0x140036160
mov rax, qword [rsp + 0x40]
add eax, edx
cmp eax, dword [rsp + 0x3c]
mov r13d, dword [rsp + 0x24]
jg 0x140036180
cmp edx, dword [rsp + 0x28]
jl 0x140036270
jne 0x140036180
cmp r15d, dword [rsp + 0x2c]
jge 0x140036180
mov eax, edx
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x2c], r15d
jmp 0x140036180
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x14003629a
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rsp + 0x24], eax
jmp 0x1400362a9
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 0x140036403
mov rdi, r14
cmp r12d, ecx
jge 0x140036306
mov rdi, r14
nop dword [rax + rax]
mov rdi, qword [rdi + 8]
cmp dword [rdi], ecx
jl 0x1400362d0
jmp 0x140036306
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 0x140036403
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 0x140036320
mov esi, dword [r14]
xor r12d, r12d
mov r10d, 0
cmp esi, r15d
jge 0x1400363c0
xor r10d, r10d
xor edx, edx
xor r9d, r9d
mov r11, r14
jmp 0x140036388
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 0x1400363c0
mov r12d, dword [r11 + 4]
mov r13d, r12d
sub r13d, r9d
jle 0x140036350
imul r13d, edx
mov r11, qword [r11 + 8]
mov r8d, dword [r11]
mov eax, r8d
cmp esi, ebx
jge 0x1400363b0
sub eax, ebx
jmp 0x140036378
sub eax, esi
jmp 0x140036378
mov rax, qword [rsp + 0x40]
add eax, r12d
cmp eax, dword [rsp + 0x3c]
jg 0x1400362f9
cmp r12d, dword [rsp + 0x28]
jg 0x1400362f9
jl 0x1400362e0
cmp r10d, dword [rsp + 0x2c]
jl 0x1400362e0
jne 0x1400362f9
cmp ebx, dword [rsp + 0x24]
jl 0x1400362e0
jmp 0x1400362f9
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 0x1400364e0
mov rcx, qword [rsp + 0x40]
add ecx, dword [rsp + 0x28]
cmp ecx, dword [rsp + 0x3c]
jg 0x1400364e0
mov rax, rcx
mov rcx, qword [r15 + 0x20]
test rcx, rcx
je 0x1400364e0
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 0x140036496
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 0x1400364ea
lea r9, [rdx + 8]
nop dword [rax + rax]
cmp dword [r8], r12d
jg 0x1400364ea
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 0x1400364b0
jmp 0x1400364ed
mov qword [rsi + r14*8 + 0xc], r11
jmp 0x140036079
mov rax, rdx
mov qword [rcx + 8], rax
cmp dword [rax], r12d
jge 0x1400364f9
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 0x140036079
cmp ebx, 2
jb 0x140036530
lea r9, [0x14003c590]
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 0x140036584
shl rdi, 3
lea rax, [rdi + rdi*2]
mov ecx, 1
xor edx, edx
xor r8d, r8d
jmp 0x140036571
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 0x140036584
cmp dword [rsi + r8 + 0xc], 0x7fffffff
je 0x140036550
mov r9d, 1
jmp 0x140036563
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret