Function at 0x140038990
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
movzx edx, byte [rcx + 8]
mov ebp, edx
mov rbx, rcx
and ebp, 2
jne 0x1400391c0
test dl, 4
jne 0x140039194
and edx, 1
je 0x1400389eb
mov rdi, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov esi, 0x41
mov ecx, esi
call rdi
cdqe
movzx eax, byte [rbx + rax + 0x444]
mov byte [rbx + rsi + 0x444], al
add rsi, 1
cmp rsi, 0x5b
jne 0x1400389cc
mov r12d, dword [rbx + 0x18]
mov ecx, 0x40c
mov edi, 1
mov dword [rbx + 0x2c], 1
mov r13d, 1
test r12d, r12d
je 0x140038a4b
mov rcx, qword [rbx + 0x10]
mov eax, r12d
mov edi, 1
lea r9, [rcx + rax*8]
mov r8, qword [rcx]
add rcx, 8
movzx edx, byte [r8 + 0x14]
mov eax, edx
and edx, 1
shr al, 1
and eax, 1
add eax, edx
add eax, dword [r8 + 0x10]
add edi, eax
cmp r9, rcx
jne 0x140038a1b
mov r13d, edi
mov dword [rbx + 0x2c], edi
imul rcx, r13, 0x40c
mov edx, 1
call sym.calloc
mov rsi, rax
test rax, rax
je 0x140039279
mov qword [rbx + 0x20], rax
mov rcx, r13
mov edx, 1
shl rcx, 4
call sym.calloc
mov r10, rax
test rax, rax
je 0x140039279
mov qword [rbx + 0x30], rax
mov dword [rbx + 0x28], 1
test edi, edi
je 0x140038add
mov r8d, edi
mov rdx, rsi
mov rax, 0xffffffffffffffff
imul r8, r8, 0x40c
add r8, rsi
lea rdi, [rdx + 8]
mov rcx, rdx
mov qword [rdx], 0xffffffffffffffff
add rdx, 0x40c
and rdi, 0xfffffffffffffff8
mov qword [rdx - 0xc], 0xffffffffffffffff
sub rcx, rdi
add ecx, 0x408
shr ecx, 3
rep stosq qword [rdi], rax
cmp rdx, r8
jne 0x140038aa8
test bpl, bpl
je 0x140038af3
mov dword [rbx + 0x28], 2
mov dword [rsi + 0x400], 1
test r12d, r12d
je 0x140038c62
xor r12d, r12d
mov rax, qword [rbx + 0x10]
mov r13, qword [rax + r12*8]
movzx r14d, byte [r13 + 0x14]
mov esi, dword [r13 + 0x10]
mov r9, qword [r13 + 8]
test r14b, 1
je 0x140038c50
mov rax, qword [rbx + 0x20]
movsxd rbp, dword [rax + 0x400]
mov rcx, rbp
test esi, esi
je 0x140038c04
mov r11, qword [rbx + 0x20]
mov rdi, r9
xor r8d, r8d
jmp 0x140038b53
add r8d, 1
mov ecx, edx
add rdi, 1
cmp esi, r8d
je 0x140038c59
movsxd rax, ecx
movzx r15d, byte [rdi]
imul rdx, rax, 0x40c
mov rbp, rax
add rdx, r11
mov edx, dword [rdx + r15*4]
cmp edx, 0xffffffff
jne 0x140038b40
cmp r8d, esi
jae 0x140038c04
mov r15d, dword [rbx + 0x28]
mov edx, r8d
mov ebp, r14d
mov qword [rsp + 0x38], r13
add r9, rdx
and ebp, 4
lea edi, [rsi + r15]
mov edx, r15d
sub edi, r8d
jmp 0x140038bc3
movsxd rax, r13d
imul rax, rax, 0x40c
mov r13d, edx
add edx, 1
mov dword [rbx + 0x28], edx
add rax, r11
test bpl, bpl
je 0x140038be1
mov dword [rax + 0x200], ecx
movzx ecx, byte [r9]
add r9, 1
mov dword [rax + rcx*4], r13d
mov ecx, r13d
cmp edx, edi
jne 0x140038bc0
lea ebp, [rsi + r15 - 1]
mov r13, qword [rsp + 0x38]
sub ebp, r8d
movsxd rbp, ebp
and r14d, 2
je 0x140038c27
mov eax, dword [rbx + 0x28]
lea edx, [rax + 1]
mov dword [rbx + 0x28], edx
imul rdx, rbp, 0x40c
add rdx, qword [rbx + 0x20]
movsxd rbp, eax
mov dword [rdx + 0x404], eax
shl rbp, 4
mov r8d, 1
mov rdx, r13
add r12, 1
lea rcx, [r10 + rbp]
call dbg.smack_copy_matches
cmp r12d, dword [rbx + 0x18]
jae 0x140038c5e
mov r10, qword [rbx + 0x30]
jmp 0x140038aff
xor ebp, ebp
xor ecx, ecx
jmp 0x140038b2c
movsxd rbp, edx
jmp 0x140038c04
mov rsi, qword [rbx + 0x20]
mov rax, rsi
lea rdx, [rsi + 0x408]
nop word cs:[rax + rax]
nop word [rax + rax]
cmp dword [rax], 0xffffffff
jne 0x140038c8b
mov dword [rax], 0
add rax, 4
cmp rax, rdx
jne 0x140038c80
call dbg.queue_create
xor esi, esi
mov rdx, qword [rbx + 0x20]
mov rdi, rax
jmp 0x140038ccb
add esi, 1
cmp esi, 0x102
je 0x140038d01
mov eax, esi
mov ebp, dword [rdx + rax*4]
test ebp, ebp
je 0x140038cc0
mov edx, ebp
mov rcx, rdi
add esi, 1
call dbg.enqueue
mov eax, ebp
mov rdx, qword [rbx + 0x20]
imul rax, rax, 0x40c
mov dword [rdx + rax + 0x408], 0
cmp esi, 0x102
jne 0x140038ccb
mov rcx, rdi
call sym.queue_has_more_items
mov rcx, rdi
test eax, eax
je 0x140038de1
call sym.dequeue
xor ebp, ebp
mov r12d, eax
mov rsi, r12
imul r12, r12, 0x40c
nop dword [rax + rax]
mov r14d, ebp
lea rax, [r14*4]
add rax, qword [rbx + 0x20]
mov r13d, dword [rax + r12]
cmp r13d, 0xffffffff
je 0x140038dbf
cmp esi, r13d
je 0x140038dbf
mov rcx, rdi
mov edx, r13d
call dbg.enqueue
mov rcx, qword [rbx + 0x20]
mov eax, dword [rcx + r12 + 0x408]
jmp 0x140038d86
mov eax, dword [rax + 0x408]
imul rax, rax, 0x40c
add rax, rcx
mov edx, dword [rax + r14*4]
cmp edx, 0xffffffff
je 0x140038d80
imul rax, r13, 0x40c
mov dword [rcx + rax + 0x408], edx
mov rcx, qword [rbx + 0x30]
shl rdx, 4
add rdx, rcx
mov r8d, dword [rdx + 8]
test r8d, r8d
jne 0x140038ea0
add ebp, 1
cmp ebp, 0x102
jne 0x140038d30
mov rcx, rdi
call sym.queue_has_more_items
mov rcx, rdi
test eax, eax
jne 0x140038d14
call dbg.queue_destroy
xor esi, esi
call dbg.queue_create
mov rbp, rax
jmp 0x140038e0b
add esi, 1
cmp esi, 0x102
je 0x140038e2b
mov rax, qword [rbx + 0x20]
mov edx, esi
mov edx, dword [rax + rdx*4]
test edx, edx
je 0x140038e00
mov rcx, rbp
add esi, 1
call dbg.enqueue
cmp esi, 0x102
jne 0x140038e0b
mov rcx, rbp
call sym.queue_has_more_items
mov rcx, rbp
mov edi, eax
test eax, eax
je 0x140038eb4
call sym.dequeue
xor esi, esi
mov r12d, eax
mov rdi, r12
imul r12, r12, 0x40c
jmp 0x140038e6f
cmp edi, edx
je 0x140038e64
mov rcx, rbp
call dbg.enqueue
add esi, 1
cmp esi, 0x102
je 0x140038e2b
mov rax, qword [rbx + 0x20]
mov r8d, esi
lea rcx, [rax + r12]
mov edx, dword [rcx + r8*4]
cmp edx, 0xffffffff
jne 0x140038e58
mov edx, dword [rcx + 0x408]
imul rdx, rdx, 0x40c
add rax, rdx
mov eax, dword [rax + r8*4]
mov dword [rcx + r8*4], eax
jmp 0x140038e64
shl r13, 4
mov rdx, qword [rdx]
add rcx, r13
call dbg.smack_copy_matches
jmp 0x140038dbf
call dbg.queue_destroy
test byte [rbx + 8], 2
jne 0x1400391f8
mov esi, dword [rbx + 0x28]
xor ebp, ebp
cmp ebp, esi
jb 0x1400390d8
mov eax, dword [rbx + 0x548]
mov dword [rbx + 0x38], ebp
mov ebp, dword [rbx + 0x28]
lea edx, [rax + 1]
cmp edx, 2
jbe 0x14003924f
mov r12d, 1
mov r8d, 1
mov ecx, r12d
add ecx, 1
mov eax, r8d
shl eax, cl
cmp eax, edx
jb 0x140038ef7
mov r12d, ecx
mov ecx, ebp
mov dword [rbx + 0x54c], r12d
mov edx, 1
imul rcx, rax
add rcx, rcx
call sym.calloc
mov rsi, rax
test rax, rax
je 0x140039279
test ebp, ebp
je 0x140038f71
mov r8, qword [rbx + 0x20]
mov ecx, r12d
mov r10d, edi
xor eax, eax
shl r10d, cl
nop
movzx edx, byte [rbx + rax + 0x444]
mov r9d, dword [r8 + rax*4]
add rax, 1
add rdx, r10
mov word [rsi + rdx*2], r9w
cmp rax, 0x102
jne 0x140038f40
add edi, 1
add r8, 0x40c
cmp ebp, edi
jne 0x140038f37
mov r12d, ecx
mov edi, dword [rbx + 0x18]
mov r15, qword [rbx + 0x10]
mov qword [rbx + 0x550], rsi
mov qword [rsp + 0x38], rdi
test edi, edi
je 0x14003925f
mov ecx, r12d
mov r14d, 2
xor r8d, r8d
mov rax, r15
shl r14, cl
mov r15, r8
mov ecx, r12d
mov r8, rax
mov qword [rsp + 0x40], r14
lea r9, [rsp + 0x6c]
mov r12, rsi
jmp 0x140038fc5
add r15, 1
cmp qword [rsp + 0x38], r15
je 0x140039136
mov r10, qword [r8 + r15*8]
test byte [r10 + 0x14], 8
je 0x140038fb6
mov eax, dword [r10 + 0x10]
test eax, eax
je 0x140038fb6
movzx r13d, byte [rbx + 8]
mov rbp, qword [r10 + 8]
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x6c], 0
shr r13b, 1
and r13d, 1
cmp byte [rbp], 0x2a
je 0x14003912c
xor edi, edi
nop word cs:[rax + rax]
nop word cs:[rax + rax]
nop word [rax + rax]
add rdi, 1
cmp rax, rdi
je 0x140038fb6
cmp byte [rbp + rdi], 0x2a
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x6c], 0
jne 0x140039020
mov qword [rsp + 0x48], rax
mov esi, edi
lea r14, [rsp + 0x68]
mov dword [rsp + 0x5c], ecx
mov qword [rsp + 0x50], r15
mov r15, r8
nop dword [rax + rax]
mov dword [rsp + 0x20], esi
mov r8, rbp
mov rdx, r14
mov rcx, rbx
call dbg.smack_search_next
mov eax, dword [rsp + 0x6c]
cmp rax, rdi
jb 0x140039060
mov r10d, dword [rsp + 0x68]
mov ecx, dword [rsp + 0x5c]
mov r8, r15
mov rax, qword [rsp + 0x48]
mov r15, qword [rsp + 0x50]
and r10d, 0xffffff
shl r10d, cl
lea r10, [r12 + r10*2]
movzx r11d, byte [rbx + 0x46e]
mov rsi, qword [rsp + 0x40]
movzx r11d, word [r10 + r11*2]
add rsi, r10
nop word cs:[rax + rax]
nop
cmp word [r10], r13w
jne 0x1400390ca
mov word [r10], r11w
add r10, 2
cmp rsi, r10
jne 0x1400390c0
jmp 0x140039020
mov rdx, qword [rbx + 0x30]
mov eax, ebp
shl rax, 4
mov ecx, dword [rdx + rax + 8]
test ecx, ecx
jne 0x140039103
add ebp, 1
jmp 0x140038ec8
mov esi, r8d
cmp ebp, esi
jae 0x140038ed0
lea eax, [rsi - 1]
mov r8, rax
shl rax, 4
mov eax, dword [rdx + rax + 8]
test eax, eax
jne 0x140039100
mov edx, ebp
mov rcx, rbx
call dbg.swap_rows
jmp 0x140038ec8
mov r10, r12
xor edi, edi
jmp 0x14003909f
mov r15, r8
xor esi, esi
mov rdi, qword [r15 + rsi*8]
add rsi, 1
mov rcx, qword [rdi + 8]
call sym.free
mov rcx, rdi
call sym.free
mov r15, qword [rbx + 0x10]
cmp esi, dword [rbx + 0x18]
jb 0x14003913b
mov rcx, r15
call sym.free
mov qword [rbx + 0x10], 0
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x140039183
call sym.free
mov qword [rbx + 0x20], 0
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [rcx + 0x548]
test eax, eax
je 0x14003926d
mov ecx, 1
jmp 0x1400391b1
add rcx, 1
cmp eax, ecx
jb 0x14003920d
cmp dword [rbx + rcx*4 + 0x3c], 0x101
jne 0x1400391a9
jmp 0x1400389bb
mov eax, dword [rcx + 0x548]
test eax, eax
je 0x1400392a8
mov ecx, 1
jmp 0x1400391dd
add rcx, 1
cmp eax, ecx
jb 0x14003922b
cmp dword [rbx + rcx*4 + 0x3c], 0x100
jne 0x1400391d5
test dl, 4
je 0x1400389bb
mov eax, dword [rbx + 0x548]
jmp 0x1400391a2
mov r8d, 1
xor edx, edx
mov rcx, rbx
call dbg.swap_rows
jmp 0x140038ec3
add eax, 1
mov ecx, eax
mov dword [rbx + 0x548], eax
mov dword [rbx + rax*4 + 0x3c], 0x101
mov byte [rbx + 0x545], cl
jmp 0x1400389bb
add eax, 1
mov ecx, eax
mov dword [rbx + 0x548], eax
mov dword [rbx + rax*4 + 0x3c], 0x100
mov byte [rbx + 0x544], cl
test dl, 4
je 0x1400389bb
jmp 0x1400391f0
mov eax, 2
mov r12d, 1
jmp 0x140038f06
test r15, r15
jne 0x14003915d
jmp 0x14003916d
mov ecx, 1
mov eax, 1
jmp 0x140039212
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea r8, [0x14006ff70]
lea rdx, [0x14006ff76]
mov rcx, rax
call sym.fprintf_1
mov ecx, 1
call sym.exit
nop dword [rax]
mov ecx, 1
mov eax, 1
jmp 0x140039230