Function at 0x100406d60
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov r12, rcx
mov rcx, qword [0x10040d030]
mov r13d, edx
mov ebx, r8d
mov edi, ebx
call sub.msys_2.0.dll_strlen
add r13d, eax
mov dword [rsp + 0x28], eax
mov rsi, rax
mov eax, dword [0x10040d03c]
test eax, eax
setle byte [0x1004170e5]
and edi, 1
je 0x100406db7
mov edx, dword [0x1004170ec]
cmp edx, dword [0x10040d020]
jg 0x100406ec0
mov eax, ebx
and eax, 0xc
cmp eax, 4
jne 0x100406dca
cmp byte [0x1004170e6], 0
jne 0x100406e20
test r12, r12
jne 0x100406f10
mov qword [0x1004170c8], 0
xor r8d, r8d
lea rdx, [0x100410bf4]
lea r13, [0x1004170c0]
mov rcx, r13
call fcn.100406b70
and ebx, 4
jne 0x100406ed8
mov rcx, r12
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 ebp, dword [0x10040d03c]
test ebp, ebp
js 0x100406dca
mov r8d, dword [0x1004170ec]
add r13d, r8d
cmp ebp, r13d
jge 0x100406dca
mov rax, qword [0x10040d028]
mov rcx, r12
mov dword [rsp + 0x30], r8d
xor r13d, r13d
mov qword [rsp + 0x50], rax
call sub.msys_2.0.dll_strlen
movzx r9d, byte [r12]
mov r8d, dword [rsp + 0x30]
xor r11d, r11d
mov r15, rax
mov r10d, 1
mov r14d, r9d
lea rdx, [r12 + 1]
mov eax, r14d
xor ecx, ecx
test r14b, r14b
jne 0x100406eab
jmp 0x100406f50
lea r9, [rcx + 1]
test r13d, r13d
je 0x100406f28
mov byte [r11 + rcx], al
mov rcx, r9
movzx eax, byte [rdx]
add rdx, 1
test al, al
je 0x100406f50
cmp al, 0x20
jne 0x100406e88
test r13d, r13d
jne 0x100406f30
add r15, 2
jmp 0x100406e9c
add edx, r13d
cmp eax, edx
jge 0x100406db7
call fcn.100406c00
jmp 0x100406db7
mov rdx, qword [0x10040d030]
test rdx, rdx
jne 0x100407077
mov qword [0x1004170c8], 0
xor r8d, r8d
lea rdx, [0x100410bf4]
mov rcx, r13
call fcn.100406b70
jmp 0x100406e00
mov rcx, r12
call sub.msys_2.0.dll_strlen
mov rdx, r12
mov r8, rax
jmp 0x100406de8
mov rcx, r9
jmp 0x100406e9c
lea rax, [r11 + rcx]
mov r9d, 0x735c
add rcx, 2
mov word [rax], r9w
mov byte [rax + 2], 0
jmp 0x100406e9c
test r13d, r13d
je 0x1004072f2
mov byte [r11 + rcx], 0
cmp r10d, 2
jne 0x10040706a
mov rcx, r11
mov dword [rsp + 0x30], r8d
mov qword [rsp + 0x38], r11
call sub.msys_2.0.dll_strlen
mov r8d, dword [rsp + 0x30]
mov dword [rsp + 0x4c], eax
mov r15, rax
mov eax, dword [0x1004170f4]
sub eax, 2
cmp eax, 1
jbe 0x100407340
mov rcx, qword [rsp + 0x38]
mov edx, 0x3d
mov dword [rsp + 0x30], r8d
call sub.msys_2.0.dll_strchr
test rax, rax
je 0x1004073a3
add rax, 1
mov edx, 8
sub rax, qword [rsp + 0x38]
cmp eax, edx
lea rcx, [rsp + 0x67]
lea r9, [0x100410c06]
cmovle edx, eax
mov dword [rsp + 0x40], edx
mov r8d, edx
lea rdx, [0x100410c08]
call sub.msys_2.0.dll_sprintf
cmp byte [0x1004170e7], 0
je 0x100407091
mov r14, qword [rsp + 0x38]
mov edx, 0xa
mov rcx, r14
call sub.msys_2.0.dll_strchr
test rax, rax
je 0x100407091
mov rsi, r14
lea r13, [0x1004170c0]
test r15d, r15d
jle 0x100407036
nop
mov rcx, rsi
call sub.msys_2.0.dll_strlen
mov rdx, rsi
mov rcx, r13
mov r8, rax
call fcn.100406b70
and ebx, 4
jne 0x10040736a
mov rax, qword [rsp + 0x50]
mov qword [0x10040d028], rax
call fcn.100406c00
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 r13d, 1
add r10d, 1
jmp 0x100406e6e
mov rcx, rdx
mov qword [rsp + 0x28], rdx
call sub.msys_2.0.dll_strlen
mov rdx, qword [rsp + 0x28]
mov r8, rax
jmp 0x100406efd
mov eax, dword [0x1004170f4]
mov dword [rsp + 0x48], 0
sub eax, 2
cmp eax, 1
jbe 0x1004073aa
mov eax, 0x20
cmp ebp, eax
cmovge eax, ebp
add esi, r15d
add esi, dword [0x1004170ec]
mov dword [rsp + 0x44], eax
cmp eax, esi
jge 0x100407459
mov dword [rsp + 0x58], ebx
mov esi, dword [rsp + 0x44]
lea r13, [0x1004170c0]
mov dword [rsp + 0x34], 0
sub esi, dword [rsp + 0x48]
mov dword [rsp + 0x30], r15d
mov edi, esi
lea r15, [rsp + 0x67]
nop dword [rax]
mov eax, dword [rsp + 0x4c]
movsxd rbp, dword [rsp + 0x34]
sub eax, ebp
cmp eax, edi
cmovle edi, eax
test edi, edi
jle 0x10040717a
mov ecx, edi
sub ecx, 1
je 0x100407423
mov rax, qword [rsp + 0x38]
movsxd r14, ecx
mov rsi, r14
lea r12, [rax + rbp]
jmp 0x10040714c
call sub.msys_2.0.dll___locale_ctype_ptr
test byte [rbx + rax + 1], 7
je 0x100407200
sub rsi, 1
test esi, esi
je 0x100407200
movzx ebx, byte [r12 + rsi]
mov r8d, esi
lea rax, [rbp + rsi]
cmp bl, 0x5c
jne 0x100407130
mov rsi, qword [rsp + 0x38]
cmp byte [rsi + rax - 1], 0x5c
jne 0x10040716e
sub r8d, 1
cmp edi, r8d
jle 0x10040748b
mov edi, r8d
mov rax, qword [rsp + 0x38]
movsxd r8, edi
mov rcx, r13
lea rdx, [rax + rbp]
call fcn.100406b70
sub dword [rsp + 0x30], edi
mov eax, dword [rsp + 0x30]
add dword [rsp + 0x34], edi
test eax, eax
jle 0x1004071b2
call fcn.100406c00
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 0x1004072ad
mov edx, dword [rsp + 0x34]
mov edi, dword [rsp + 0x44]
sub edi, dword [rsp + 0x48]
test edx, edx
je 0x1004070f8
mov rcx, r15
call sub.msys_2.0.dll_strlen
mov rdx, r15
mov rcx, r13
mov r8, rax
call fcn.100406b70
sub edi, dword [rsp + 0x40]
jmp 0x1004070f8
mov ecx, dword [rsp + 0x34]
mov r8d, edi
jmp 0x10040721d
sub r14, 1
test r14d, r14d
je 0x1004072a1
cmp byte [r12 + r14], 0x25
mov esi, r14d
lea eax, [rcx + r14]
lea rdx, [rbp + r14]
jne 0x100407210
test eax, eax
jle 0x100407243
mov rbx, qword [rsp + 0x38]
mov ecx, r14d
cmp byte [rbx + rdx - 1], 0x5c
je 0x10040729b
mov rbx, qword [rsp + 0x38]
mov ecx, dword [0x1004170f4]
lea edx, [rax + 1]
movsxd rdx, edx
movsx r9d, byte [rbx + rdx]
lea edx, [rcx - 2]
cmp edx, 1
jbe 0x1004073d1
cmp r9d, 0x27
je 0x10040741b
cmp r9d, 0x7b
je 0x10040742e
lea rcx, [0x100410c0c]
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 0x10040717a
mov eax, dword [rsp + 0x30]
mov ebx, dword [rsp + 0x58]
test eax, eax
jle 0x100407036
movsxd rsi, dword [rsp + 0x34]
mov rax, rsi
add rsi, qword [rsp + 0x38]
test eax, eax
je 0x100407020
lea r12, [rsp + 0x67]
mov rcx, r12
call sub.msys_2.0.dll_strlen
mov rdx, r12
mov rcx, r13
mov r8, rax
call fcn.100406b70
jmp 0x100407020
lea rcx, [r15 + 1]
mov edx, 1
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r8d
call sub.msys_2.0.dll_calloc
mov r8d, dword [rsp + 0x30]
mov r10d, dword [rsp + 0x34]
test rax, rax
mov r11, rax
jne 0x10040706a
lea rcx, str.fill_spaces
call sub.msys_2.0.dll_perror
mov ecx, 1
call sub.msys_2.0.dll_exit
nop word cs:[rax + rax]
lea rax, str._n_t
mov qword [0x10040d028], rax
cmp r8d, 8
jg 0x1004073e9
mov byte [rsp + 0x67], 0
mov dword [rsp + 0x40], 0
jmp 0x100406fe7
mov r12, qword [0x10040d030]
test r12, r12
jne 0x10040747b
mov qword [0x1004170c8], 0
xor r8d, r8d
lea r12, [0x100410bf4]
mov rdx, r12
lea rcx, [0x1004170c0]
call fcn.100406b70
jmp 0x10040703f
mov r8d, dword [rsp + 0x30]
jmp 0x10040734e
cmp qword [0x1004170c8], 0
je 0x1004073c4
mov dword [rsp + 0x48], 3
test edi, edi
je 0x1004070ab
mov dword [rsp + 0x48], 0
jmp 0x1004070ab
cmp r9d, 0x3e
je 0x10040741b
xor ecx, ecx
cmp r9d, 0x2b
sete cl
lea ecx, [rcx + rsi + 2]
jmp 0x10040729b
lea ecx, [r8 - 8]
mov eax, 8
lea r9, [0x100410c06]
cmp ecx, eax
lea rdx, [0x100410c08]
cmovle eax, ecx
lea rcx, [rsp + 0x67]
mov r8d, eax
mov dword [rsp + 0x40], eax
call sub.msys_2.0.dll_sprintf
jmp 0x100406fe7
lea ecx, [rsi + 4]
jmp 0x10040729b
mov r8d, 1
jmp 0x1004072a1
cdqe
mov edx, 1
add rax, qword [rsp + 0x38]
movsx ecx, byte [rax + rdx + 1]
mov r9d, edx
test ecx, ecx
je 0x100407473
add rdx, 1
cmp ecx, 0x7d
jne 0x10040743a
lea ecx, [r9 + rsi + 2]
jmp 0x10040729b
mov rsi, qword [rsp + 0x38]
lea r13, [0x1004170c0]
test r15d, r15d
jg 0x100407020
jmp 0x100407036
lea ecx, [rsi + 1]
jmp 0x10040729b
mov rcx, r12
call sub.msys_2.0.dll_strlen
mov r8, rax
jmp 0x10040738f
mov ecx, dword [rsp + 0x34]
jmp 0x10040721d