Function at 0x401180
Capabilities:
Terminate process

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov ecx, 0xd
xor eax, eax
lea r8, [rsp + 0x20]
mov rdi, r8
rep stosq qword [rdi], rax
mov rdi, qword [0x00405530]
mov r9d, dword [rdi]
test r9d, r9d
jne 0x401460
mov rax, qword gs:[0x30]
mov rbx, qword [0x00405480]
mov rsi, qword [rax + 8]
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4011e9
cmp rsi, rax
je 0x401400
mov ecx, 0x3e8
call r12
mov rax, rbp
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x4011d8
mov rsi, qword [0x00405490]
xor ebp, ebp
mov eax, dword [rsi]
cmp eax, 1
je 0x401417
mov eax, dword [rsi]
test eax, eax
je 0x401490
mov dword [0x00408008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x40142c
test ebp, ebp
je 0x40144d
mov rax, qword [0x00405430]
mov rax, qword [rax]
test rax, rax
je 0x40124c
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call sym._pei386_runtime_relocator
lea rcx, [sym._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x00405470]
mov qword [rdx], rax
call sym.__mingw_init_ehandler
lea rcx, section..text
call sym._set_invalid_parameter_handler
call sym._fpreset
mov rax, qword [0x00405440]
mov qword [0x00408978], rax
call sym.__p__acmdln
xor ecx, ecx
mov rax, qword [rax]
test rax, rax
jne 0x4012b2
jmp 0x4012f0
test dl, dl
je 0x4012e9
and ecx, 1
je 0x4012d0
mov ecx, 1
add rax, 1
movzx edx, byte [rax]
cmp dl, 0x20
jle 0x4012a0
mov r8d, ecx
xor r8d, 1
cmp dl, 0x22
cmove ecx, r8d
jmp 0x4012ae
test dl, dl
je 0x4012e9
nop dword [rax]
movzx edx, byte [rax + 1]
add rax, 1
test dl, dl
je 0x4012e9
cmp dl, 0x20
jle 0x4012d8
mov qword [0x00408970], rax
mov r8d, dword [rdi]
test r8d, r8d
je 0x40130e
mov eax, 0xa
test byte [rsp + 0x5c], 1
jne 0x4013f0
mov dword [section..data], eax
mov ebx, dword [0x00408028]
lea r12d, [rbx + 1]
movsxd r12, r12d
shl r12, 3
mov rcx, r12
call sym.malloc
mov r13, qword [0x00408020]
mov rdi, rax
test ebx, ebx
jle 0x40137b
lea ebp, [rbx - 1]
xor ebx, ebx
nop word [rax + rax]
mov rcx, qword [r13 + rbx*8]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [rdi + rbx*8], rax
mov rdx, qword [r13 + rbx*8]
mov rcx, rax
call sym.memcpy
mov rax, rbx
add rbx, 1
cmp rbp, rax
jne 0x401340
lea rax, [rdi + r12 - 8]
mov qword [rax], 0
mov qword [0x00408020], rdi
call sym.__main
mov rax, qword [0x00405450]
mov r8, qword [0x00408018]
mov ecx, dword [0x00408028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x00408020]
call sym.main
mov ecx, dword [0x0040800c]
mov dword [0x00408010], eax
test ecx, ecx
je 0x4014ae
mov edx, dword [0x00408008]
test edx, edx
je 0x401470
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
movzx eax, word [rsp + 0x60]
jmp 0x401308
mov rsi, qword [0x00405490]
mov ebp, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x40120a
mov ecx, 0x1f
call sym._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x401229
mov rdx, qword [0x004054b0]
mov rcx, qword [0x004054a0]
call sym._initterm
mov dword [rsi], 2
test ebp, ebp
jne 0x401231
xor eax, eax
xchg qword [rbx], rax
jmp 0x401231
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_GetStartupInfoA]
jmp 0x4011b4
call sym._cexit
mov eax, dword [0x00408010]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdx, qword [0x004054d0]
mov rcx, qword [0x004054c0]
mov dword [rsi], 1
call sym._initterm
jmp 0x40121e
mov ecx, eax
call sym.exit
nop
nop word cs:[rax + rax]