Function at 0x1004068c0
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov r13, rcx
mov rcx, qword [0x10040d030]
mov edi, edx
mov ebx, r8d
mov ebp, ebx
call sub.msys_2.0.dll_strlen
add edi, eax
mov dword [rsp + 0x28], eax
mov rsi, rax
mov eax, dword [0x10040d03c]
test eax, eax
setle byte [0x1004170e5]
and ebp, 1
je 0x100406915
mov edx, dword [0x1004170ec]
cmp edx, dword [0x10040d020]
jg 0x100406a20
mov eax, ebx
and eax, 0xc
cmp eax, 4
jne 0x100406928
cmp byte [0x1004170e6], 0
jne 0x100406980
test r13, r13
jne 0x100406a70
mov qword [0x1004170c8], 0
xor r8d, r8d
lea rdx, [0x100410c54]
lea r12, [0x1004170c0]
mov rcx, r12
call fcn.1004066d0
and ebx, 4
jne 0x100406a38
mov rcx, r13
call sub.msys_2.0.dll_strlen
add dword [0x1004170ec], eax
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12d, dword [0x10040d03c]
test r12d, r12d
js 0x100406928
mov r8d, dword [0x1004170ec]
add edi, r8d
cmp r12d, edi
jge 0x100406928
mov rax, qword [0x10040d028]
mov rcx, r13
mov dword [rsp + 0x30], r8d
xor edi, edi
mov qword [rsp + 0x50], rax
call sub.msys_2.0.dll_strlen
movzx r9d, byte [r13]
mov r8d, dword [rsp + 0x30]
xor r10d, r10d
mov r14, rax
mov r11d, 1
mov r15d, r9d
lea rcx, [r13 + 1]
mov eax, r15d
xor edx, edx
test r15b, r15b
jne 0x100406a0d
jmp 0x100406ab0
lea r9d, [rdx + 1]
test edi, edi
je 0x100406a88
movsxd rdx, edx
mov byte [r10 + rdx], al
mov edx, r9d
movzx eax, byte [rcx]
add rcx, 1
test al, al
je 0x100406ab0
cmp al, 0x20
jne 0x1004069e8
test edi, edi
jne 0x100406a90
add r14, 2
jmp 0x1004069fe
add edx, edi
cmp eax, edx
jge 0x100406915
call fcn.100406760
jmp 0x100406915
mov rdx, qword [0x10040d030]
test rdx, rdx
jne 0x100406bd6
mov qword [0x1004170c8], 0
xor r8d, r8d
lea rdx, [0x100410c54]
mov rcx, r12
call fcn.1004066d0
jmp 0x10040695e
mov rcx, r13
call sub.msys_2.0.dll_strlen
mov rdx, r13
mov r8, rax
jmp 0x100406946
mov edx, r9d
jmp 0x1004069fe
movsxd rax, edx
mov r9d, 0x735c
add edx, 2
add rax, r10
mov word [rax], r9w
mov byte [rax + 2], 0
jmp 0x1004069fe
test edi, edi
je 0x100406e43
movsxd rdx, edx
mov byte [r10 + rdx], 0
cmp r11d, 2
jne 0x100406bca
mov rcx, r10
mov dword [rsp + 0x30], r8d
mov qword [rsp + 0x38], r10
call sub.msys_2.0.dll_strlen
mov r8d, dword [rsp + 0x30]
mov dword [rsp + 0x4c], eax
mov rdi, rax
mov eax, dword [0x1004170f4]
sub eax, 2
cmp eax, 1
jbe 0x100406e88
mov rcx, qword [rsp + 0x38]
mov edx, 0x3d
mov dword [rsp + 0x30], r8d
call sub.msys_2.0.dll_strchr
test rax, rax
je 0x100406eeb
add rax, 1
mov edx, 8
sub rax, qword [rsp + 0x38]
cmp eax, edx
lea rcx, [rsp + 0x67]
lea r9, [0x100410c66]
cmovle edx, eax
mov dword [rsp + 0x40], edx
mov r8d, edx
lea rdx, [0x100410c68]
call sub.msys_2.0.dll_sprintf
cmp byte [0x1004170e7], 0
je 0x100406bf0
mov r14, qword [rsp + 0x38]
mov edx, 0xa
mov rcx, r14
call sub.msys_2.0.dll_strchr
test rax, rax
je 0x100406bf0
lea r12, [0x1004170c0]
test edi, edi
jle 0x100406b96
nop dword [rax]
mov rcx, r14
call sub.msys_2.0.dll_strlen
mov rdx, r14
mov rcx, r12
mov r8, rax
call fcn.1004066d0
and ebx, 4
jne 0x100406eb2
mov rax, qword [rsp + 0x50]
mov qword [0x10040d028], rax
call fcn.100406760
mov rcx, qword [rsp + 0x38]
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msys_2.0.dll_free
add edi, 1
add r11d, 1
jmp 0x1004069cf
mov rcx, rdx
mov qword [rsp + 0x28], rdx
call sub.msys_2.0.dll_strlen
mov rdx, qword [rsp + 0x28]
mov r8, rax
jmp 0x100406a5d
mov eax, dword [0x1004170f4]
mov dword [rsp + 0x48], 0
sub eax, 2
cmp eax, 1
jbe 0x100406ef2
mov eax, 0x20
cmp r12d, eax
cmovge eax, r12d
add esi, edi
add esi, dword [0x1004170ec]
mov dword [rsp + 0x44], eax
cmp eax, esi
jge 0x100406fa1
mov dword [rsp + 0x58], ebx
mov esi, dword [rsp + 0x44]
lea r12, [0x1004170c0]
lea r14, [rsp + 0x67]
mov dword [rsp + 0x34], 0
sub esi, dword [rsp + 0x48]
mov dword [rsp + 0x30], edi
mov edi, esi
mov eax, dword [rsp + 0x4c]
movsxd rbp, dword [rsp + 0x34]
sub eax, ebp
cmp eax, edi
cmovle edi, eax
test edi, edi
jle 0x100406ccb
mov ecx, edi
sub ecx, 1
je 0x100406f6b
mov rax, qword [rsp + 0x38]
movsxd r15, ecx
mov rsi, r15
lea r13, [rax + rbp]
jmp 0x100406c9c
call sub.msys_2.0.dll___locale_ctype_ptr
test byte [rbx + rax + 1], 7
je 0x100406d50
sub rsi, 1
test esi, esi
je 0x100406d50
movzx ebx, byte [r13 + rsi]
mov r8d, esi
lea rax, [rbp + rsi]
cmp bl, 0x5c
jne 0x100406c80
mov rsi, qword [rsp + 0x38]
cmp byte [rsi + rax - 1], 0x5c
jne 0x100406cbf
sub r8d, 1
cmp edi, r8d
jle 0x100406fc3
mov edi, r8d
mov rax, qword [rsp + 0x38]
movsxd r8, edi
mov rcx, r12
lea rdx, [rax + rbp]
call fcn.1004066d0
sub dword [rsp + 0x30], edi
mov eax, dword [rsp + 0x30]
add dword [rsp + 0x34], edi
test eax, eax
jle 0x100406d03
call fcn.100406760
mov byte [0x1004170e5], 1
mov dword [rsp + 0x48], 0
mov eax, dword [rsp + 0x28]
add eax, dword [rsp + 0x30]
add eax, dword [0x1004170ec]
cmp eax, dword [rsp + 0x44]
jle 0x100406dfe
mov edx, dword [rsp + 0x34]
mov edi, dword [rsp + 0x44]
sub edi, dword [rsp + 0x48]
test edx, edx
je 0x100406c50
mov rcx, r14
call sub.msys_2.0.dll_strlen
mov rdx, r14
mov rcx, r12
mov r8, rax
call fcn.1004066d0
sub edi, dword [rsp + 0x40]
jmp 0x100406c50
mov ecx, dword [rsp + 0x34]
mov r8d, edi
jmp 0x100406d6d
sub r15, 1
test r15d, r15d
je 0x100406df2
cmp byte [r13 + r15], 0x25
mov esi, r15d
lea eax, [rcx + r15]
lea rdx, [rbp + r15]
jne 0x100406d60
test eax, eax
jle 0x100406d94
mov rbx, qword [rsp + 0x38]
mov ecx, r15d
cmp byte [rbx + rdx - 1], 0x5c
je 0x100406dec
mov rcx, qword [rsp + 0x38]
lea edx, [rax + 1]
movsxd rdx, edx
movsx r9d, byte [rcx + rdx]
mov ecx, dword [0x1004170f4]
lea edx, [rcx - 2]
cmp edx, 1
jbe 0x100406f19
cmp r9d, 0x27
je 0x100406f63
cmp r9d, 0x7b
je 0x100406f76
lea rcx, [0x100410c6c]
mov edx, r9d
mov dword [rsp + 0x5c], r8d
call sub.msys_2.0.dll_strchr
mov ecx, esi
mov r8d, dword [rsp + 0x5c]
cmp rax, 1
sbb ecx, 0xfffffffd
cmp edi, ecx
cmovl r8d, esi
cmp edi, r8d
cmovg edi, r8d
jmp 0x100406ccb
mov eax, dword [rsp + 0x30]
mov ebx, dword [rsp + 0x58]
test eax, eax
jle 0x100406b96
movsxd r14, dword [rsp + 0x34]
mov rax, r14
add r14, qword [rsp + 0x38]
test eax, eax
je 0x100406b80
lea r13, [rsp + 0x67]
mov rcx, r13
call sub.msys_2.0.dll_strlen
mov rdx, r13
mov rcx, r12
mov r8, rax
call fcn.1004066d0
jmp 0x100406b80
lea rcx, [r14 + 1]
mov dword [rsp + 0x34], r11d
mov dword [rsp + 0x30], r8d
call sub.msys_2.0.dll_malloc
mov r8d, dword [rsp + 0x30]
mov r11d, dword [rsp + 0x34]
test rax, rax
mov r10, rax
jne 0x100406bca
lea rcx, str.fill_spaces
call sub.msys_2.0.dll_perror
mov ecx, 1
call sub.msys_2.0.dll_exit
nop word [rax + rax]
lea rax, str._n_t
mov qword [0x10040d028], rax
cmp r8d, 8
jg 0x100406f31
mov byte [rsp + 0x67], 0
mov dword [rsp + 0x40], 0
jmp 0x100406b49
mov r12, qword [0x10040d030]
test r12, r12
jne 0x100406fb3
mov qword [0x1004170c8], 0
xor r8d, r8d
lea r12, [0x100410c54]
mov rdx, r12
lea rcx, [0x1004170c0]
call fcn.1004066d0
jmp 0x100406b9f
mov r8d, dword [rsp + 0x30]
jmp 0x100406e96
cmp qword [0x1004170c8], 0
je 0x100406f0c
mov dword [rsp + 0x48], 3
test ebp, ebp
je 0x100406c0a
mov dword [rsp + 0x48], 0
jmp 0x100406c0a
cmp r9d, 0x3e
je 0x100406f63
xor ecx, ecx
cmp r9d, 0x2b
sete cl
lea ecx, [rcx + rsi + 2]
jmp 0x100406dec
lea ecx, [r8 - 8]
mov eax, 8
lea r9, [0x100410c66]
cmp ecx, eax
lea rdx, [0x100410c68]
cmovle eax, ecx
lea rcx, [rsp + 0x67]
mov r8d, eax
mov dword [rsp + 0x40], eax
call sub.msys_2.0.dll_sprintf
jmp 0x100406b49
lea ecx, [rsi + 4]
jmp 0x100406dec
mov r8d, 1
jmp 0x100406df2
cdqe
mov edx, 1
add rax, qword [rsp + 0x38]
movsx ecx, byte [rax + rdx + 1]
mov r9d, edx
test ecx, ecx
je 0x100406fab
add rdx, 1
cmp ecx, 0x7d
jne 0x100406f82
lea ecx, [r9 + rsi + 2]
jmp 0x100406dec
mov r14, qword [rsp + 0x38]
jmp 0x100406b71
lea ecx, [rsi + 1]
jmp 0x100406dec
mov rcx, r12
call sub.msys_2.0.dll_strlen
mov r8, rax
jmp 0x100406ed7
mov ecx, dword [rsp + 0x34]
jmp 0x100406d6d