Function at 0x180029f1c
Capabilities:
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xc98]
sub rsp, 0xd60
cmp dword [rbp + 0xcc8], 4
mov rbx, r9
mov rdi, r8
mov r11, rdx
mov rsi, rcx
jl 0x180029f7c
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.________main_sort_initialise_..._n
add rcx, 0x60
call qword [sym.imp.msvcrt.dll_fprintf]
mov r11, qword [rbp + 0xca8]
xor r13d, r13d
mov r15d, 0x10000
lea r14d, [r13 + 1]
mov eax, r15d
mov dword [rbx + rax*4], r13d
sub rax, r14
jns 0x180029f8c
mov r10d, dword [rbp + 0xcc0]
movzx edx, byte [r11]
lea r12d, [r10 - 1]
shl edx, 8
movsxd r9, r12d
mov dword [rsp + 0x44], r12d
mov r8, r9
cmp r9, 3
jl 0x18002a04a
lea rax, [r9 + 1]
lea r10, [rdi + r9*2 - 4]
shr rax, 2
neg eax
lea r9d, [r9 + rax*4]
mov word [r10 + 4], r13w
movzx ecx, byte [r11 + r8]
sar edx, 8
shl ecx, 8
sub r8, 4
or ecx, edx
movsxd rax, ecx
sar ecx, 8
add dword [rbx + rax*4], r14d
mov word [r10 + 2], r13w
movzx edx, byte [r11 + r8 + 3]
shl edx, 8
or edx, ecx
movsxd rax, edx
sar edx, 8
add dword [rbx + rax*4], r14d
mov word [r10], r13w
movzx ecx, byte [r11 + r8 + 2]
shl ecx, 8
sub r10, 8
or ecx, edx
movsxd rax, ecx
sar ecx, 8
add dword [rbx + rax*4], r14d
mov word [r10 + 6], r13w
movzx edx, byte [r11 + r8 + 1]
shl edx, 8
or edx, ecx
movsxd rax, edx
add dword [rbx + rax*4], r14d
cmp r8, 3
jge 0x180029fcf
mov r10d, dword [rbp + 0xcc0]
movsxd r8, r9d
test r9d, r9d
js 0x18002a074
mov eax, edx
mov word [rdi + r8*2], r13w
movzx ecx, byte [r8 + r11]
sar eax, 8
shl ecx, 8
mov edx, ecx
or edx, eax
movsxd rax, edx
add dword [rbx + rax*4], r14d
sub r8, r14
jns 0x18002a052
movsxd rax, r10d
mov r9d, 0x22
mov rdx, rax
mov qword [rsp + 0x58], rax
lea rcx, [rax + r11]
neg rdx
lea r8, [rdi + rax*2]
mov al, byte [rcx + rdx]
mov byte [rcx], al
mov word [r8], r13w
add r8, 2
add rcx, r14
sub r9, r14
jne 0x18002a090
cmp dword [rbp + 0xcc8], 4
jl 0x18002a0cd
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.________bucket_sorting_..._n
add rcx, 0x60
call qword [sym.imp.msvcrt.dll_fprintf]
mov r11, qword [rbp + 0xca8]
mov rcx, r14
mov eax, dword [rbx + rcx*4 - 4]
add dword [rbx + rcx*4], eax
add rcx, r14
cmp rcx, r15
jle 0x18002a0d0
movzx r8d, byte [r11]
movsxd r9, r12d
shl r8w, 8
cmp r9d, 3
jl 0x18002a1a9
lea edi, [r9 - 2]
lea r10, [r9 + r11 - 1]
movzx edx, byte [r10 + 1]
shr r8w, 8
shl dx, 8
or dx, r8w
movzx ecx, dx
shr dx, 8
mov eax, dword [rbx + rcx*4]
sub eax, r14d
mov dword [rbx + rcx*4], eax
cdqe
mov dword [rsi + rax*4], r9d
movzx r8d, byte [r10]
sub r9d, 4
shl r8w, 8
sub r10, 4
or r8w, dx
movzx ecx, r8w
shr r8w, 8
mov eax, dword [rbx + rcx*4]
sub eax, r14d
mov dword [rbx + rcx*4], eax
movsxd rcx, eax
lea eax, [rdi + 1]
mov dword [rsi + rcx*4], eax
movzx edx, byte [r10 + 3]
shl dx, 8
or dx, r8w
movzx ecx, dx
shr dx, 8
mov eax, dword [rbx + rcx*4]
sub eax, r14d
mov dword [rbx + rcx*4], eax
cdqe
mov dword [rsi + rax*4], edi
movzx r8d, byte [r10 + 2]
shl r8w, 8
or r8w, dx
movzx ecx, r8w
mov eax, dword [rbx + rcx*4]
sub eax, r14d
mov dword [rbx + rcx*4], eax
movsxd rcx, eax
lea eax, [rdi - 1]
sub edi, 4
mov dword [rsi + rcx*4], eax
cmp r9d, 3
jge 0x18002a0fe
movsxd rax, r9d
test r9d, r9d
js 0x18002a1e7
lea rdx, [rax + r11]
movzx ecx, byte [rdx]
movzx eax, r8w
sub rdx, r14
shr ax, 8
shl cx, 8
movzx r8d, cx
or r8w, ax
movzx ecx, r8w
mov eax, dword [rbx + rcx*4]
sub eax, r14d
mov dword [rbx + rcx*4], eax
cdqe
mov dword [rsi + rax*4], r9d
sub r9d, r14d
jns 0x18002a1b5
mov r12d, 0x100
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, r12d
mov edi, r13d
lea rsi, [rbp + 0x860]
call sub.msvcrt.dll_memset
mov dword [rsi], edi
add edi, r14d
add rsi, 4
cmp edi, 0xff
jle 0x18002a206
mov r8d, r14d
lea r8d, [r8 + r8*2 + 1]
cmp r8d, r12d
jle 0x18002a21a
mov eax, 0x55555556
imul r8d
mov r8d, edx
shr r8d, 0x1f
add r8d, edx
movsxd r9, r8d
mov r11d, r8d
mov rdi, r9
cmp r8d, 0xff
jg 0x18002a305
mov rax, r9
mov r13, r9
sub rax, r9
shl r13, 2
lea r10, [rbp + rax*4 + 0x860]
movsxd r15, dword [r10 + r13]
movsxd rdx, dword [r10]
mov r12d, r11d
lea rcx, [r14 + r15]
mov eax, r15d
mov dword [rsp + 0x40], r15d
shl rcx, 0xa
shl eax, 8
mov rsi, r9
mov r14d, dword [rcx + rbx]
lea rcx, [rdx + 1]
cdqe
sub r14d, dword [rbx + rax*4]
shl rcx, 0xa
shl edx, 8
mov ecx, dword [rcx + rbx]
movsxd rax, edx
sub ecx, dword [rbx + rax*4]
cmp ecx, r14d
jbe 0x18002a2e0
lea r15d, [r8 - 1]
mov rdx, r10
mov eax, dword [rdx]
sub r12d, r8d
sub rsi, rdi
mov dword [r13 + rdx], eax
sub rdx, r13
cmp r12d, r15d
jle 0x18002a2db
movsxd rax, dword [rdx]
lea rcx, [rax + 1]
shl eax, 8
shl rcx, 0xa
cdqe
mov ecx, dword [rcx + rbx]
sub ecx, dword [rbx + rax*4]
cmp ecx, r14d
ja 0x18002a2ab
mov r15d, dword [rsp + 0x40]
mov r14d, 1
add r10, 4
mov dword [rbp + rsi*4 + 0x860], r15d
add r11d, r14d
add r9, r14
cmp r11d, 0xff
jle 0x18002a261
cmp r8d, r14d
jne 0x18002a224
xor r13d, r13d
xor r10d, r10d
mov qword [rsp + 0x48], r10
mov dword [rsp + 0x40], r13d
movsxd r15, dword [rbp + r10*4 + 0x860]
xor r14d, r14d
xor eax, eax
mov r12, r15
mov r9d, 0xffdfffff
mov qword [rsp + 0x50], rax
cmp r14d, r15d
je 0x18002a419
mov rsi, r15
shl rsi, 8
add rsi, rax
mov r13d, dword [rbx + rsi*4]
bt r13d, 0x15
jb 0x18002a40f
mov edi, dword [rbx + rsi*4 + 4]
and r13d, r9d
and edi, r9d
dec edi
cmp edi, r13d
jle 0x18002a40f
cmp dword [rbp + 0xcc8], 4
jl 0x18002a3aa
mov rcx, qword [sym.imp.msvcrt.dll__iob]
mov eax, edi
lea rdx, str.________qsort__0x_x__0x_x____done__d___this__d_n
sub eax, r13d
mov r9d, r14d
mov r8d, r15d
inc eax
add rcx, 0x60
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
call qword [sym.imp.msvcrt.dll_fprintf]
mov rax, qword [rbp + 0xcd0]
mov r9d, dword [rbp + 0xcc0]
mov r8, qword [rbp + 0xcb0]
mov rdx, qword [rbp + 0xca8]
mov rcx, qword [rbp + 0xca0]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], r13d
call fcn.180029b3c
mov rax, qword [rbp + 0xcd0]
sub edi, r13d
mov r13d, dword [rsp + 0x40]
cmp dword [rax], 0
lea r13d, [r13 + rdi + 1]
mov dword [rsp + 0x40], r13d
jl 0x18002a687
mov rax, qword [rsp + 0x50]
mov r9d, 0xffdfffff
jmp 0x18002a414
mov r13d, dword [rsp + 0x40]
bts dword [rbx + rsi*4], 0x15
inc rax
inc r14d
mov qword [rsp + 0x50], rax
cmp r14d, 0xff
jle 0x18002a339
cmp byte [rsp + r15 + 0x60], 0
jne 0x18002a6ba
lea rdi, [rbx + r15*4]
xor ecx, ecx
mov rdx, rdi
mov eax, dword [rdx]
add rcx, 4
add rdx, 0x400
and eax, r9d
mov dword [rbp + rcx + 0x45c], eax
mov eax, dword [rdx - 0x3fc]
and eax, r9d
dec eax
mov dword [rbp + rcx + 0x5c], eax
cmp rcx, 0x3fc
jle 0x18002a446
mov r11, qword [rbp + 0xca8]
shl r15d, 8
movsxd r14, r15d
mov r8d, dword [rbx + r14*4]
and r8d, r9d
movsxd rax, r8d
cmp r8d, dword [rbp + r12*4 + 0x460]
jge 0x18002a4f3
mov rsi, qword [rbp + 0xca0]
mov r14d, dword [rbp + 0xcc0]
lea r9, [rsi + rax*4]
mov edx, dword [r9]
dec edx
jns 0x18002a4b3
add edx, r14d
movsxd rax, edx
movzx r10d, byte [rax + r11]
cmp byte [rsp + r10 + 0x60], 0
jne 0x18002a4d9
movsxd rcx, dword [rbp + r10*4 + 0x460]
lea eax, [rcx + 1]
mov dword [rsi + rcx*4], edx
mov dword [rbp + r10*4 + 0x460], eax
inc r8d
add r9, 4
cmp r8d, dword [rbp + r12*4 + 0x460]
jl 0x18002a4a9
movsxd r14, r15d
mov r9d, 0xffdfffff
mov r15, qword [rbp + 0xca0]
lea rsi, [r12 + 1]
shl rsi, 0xa
mov edx, dword [rsi + rbx]
and edx, r9d
dec edx
movsxd rax, edx
cmp edx, dword [rbp + r12*4 + 0x60]
jle 0x18002a564
mov r13d, dword [rbp + 0xcc0]
lea r9, [r15 + rax*4]
mov r8d, dword [r9]
dec r8d
jns 0x18002a52b
add r8d, r13d
movsxd rax, r8d
movzx r10d, byte [rax + r11]
cmp byte [rsp + r10 + 0x60], 0
jne 0x18002a54c
movsxd rcx, dword [rbp + r10*4 + 0x60]
lea eax, [rcx - 1]
mov dword [r15 + rcx*4], r8d
mov dword [rbp + r10*4 + 0x60], eax
dec edx
sub r9, 4
cmp edx, dword [rbp + r12*4 + 0x60]
jg 0x18002a520
mov r13d, dword [rsp + 0x40]
mov r9d, 0xffdfffff
mov ecx, dword [rbp + r12*4 + 0x460]
lea eax, [rcx - 1]
cmp eax, dword [rbp + r12*4 + 0x60]
je 0x18002a58d
test ecx, ecx
jne 0x18002a6a2
mov eax, dword [rsp + 0x44]
cmp dword [rbp + r12*4 + 0x60], eax
jne 0x18002a6a2
mov eax, 0x100
bts dword [rdi], 0x15
add rdi, 0x400
dec rax
jne 0x18002a592
mov r10, qword [rsp + 0x48]
mov byte [rsp + r12 + 0x60], 1
cmp r10, 0xff
jge 0x18002a63c
mov r8d, dword [rbx + r14*4]
mov edx, dword [rsi + rbx]
xor ecx, ecx
and r8d, r9d
and edx, r9d
sub edx, r8d
cmp edx, 0xfffe
jle 0x18002a5e1
inc ecx
mov eax, edx
sar eax, cl
cmp eax, 0xfffe
jg 0x18002a5d4
lea r9d, [rdx - 1]
movsxd rax, r8d
movsxd rdx, r9d
test r9d, r9d
js 0x18002a630
mov rdi, qword [rbp + 0xcb0]
mov r13, qword [rsp + 0x58]
add rax, rdx
lea r10, [r15 + rax*4]
movsxd rax, dword [r10]
mov r8d, edx
sar r8d, cl
mov word [rdi + rax*2], r8w
cmp eax, 0x22
jge 0x18002a61e
add rax, r13
mov word [rdi + rax*2], r8w
sub r10, 4
dec edx
jns 0x18002a603
mov r10, qword [rsp + 0x48]
mov r13d, dword [rsp + 0x40]
sar r9d, cl
cmp r9d, 0xffff
jg 0x18002a6ae
inc r10
mov qword [rsp + 0x48], r10
cmp r10, 0xff
jle 0x18002a31e
cmp dword [rbp + 0xcc8], 4
jl 0x18002a687
mov edx, dword [rbp + 0xcc0]
mov rcx, qword [sym.imp.msvcrt.dll__iob]
mov r9d, r13d
mov eax, edx
mov r8d, edx
lea rdx, str._________d_pointers___d_sorted___d_scanned_n
sub eax, r13d
add rcx, 0x60
mov dword [rsp + 0x20], eax
call qword [sym.imp.msvcrt.dll_fprintf]
mov rbx, qword [rsp + 0xdb8]
add rsp, 0xd60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 3
call qword [sym.imp.msvcrt.dll_exit]
int3
mov ecx, 3
call qword [sym.imp.msvcrt.dll_exit]
int3
mov ecx, 3
call qword [sym.imp.msvcrt.dll_exit]
int3