Function at 0x40bad0
Capabilities:
Terminate process

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ecfc
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ecx
mov eax, 0x10b4
call fcn.0041ea60
mov eax, dword [0x43c100]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor ecx, ecx
push 0x20000
push 1
mov dword [ebp - 0x7f8], ecx
call fcn.0041ff80
push eax
call sub.msvcrt.dll__fileno
add esp, 8
push eax
call sub.msvcrt.dll__setmode
add esp, 8
push 0x20000
push 0
call fcn.0041ff80
push eax
call sub.msvcrt.dll__fileno
add esp, 8
push eax
call sub.msvcrt.dll__setmode
push str.Usage:_attachdetachhookcode__Pprocessid_n
call fcn.0040c200
push 1
call fcn.0041ff80
push eax
call sub.msvcrt.dll_fflush
add esp, 0x14
push 1
sub esp, 0x28
mov eax, esp
sub esp, 0x28
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_185e8cd1010e15048e7bd87524018a96___bool__class_TextThread___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____.0
mov dword [eax + 0x24], eax
mov eax, esp
sub esp, 0x28
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_71b267db7e8ffa4294cbee5b646f648c___void__class_TextThread__.0
mov dword [eax + 0x24], eax
mov eax, esp
sub esp, 0x28
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_3a6800e339df1a913f78808452fcac50___void__class_TextThread__.0
mov dword [eax + 0x24], eax
mov eax, esp
sub esp, 0x28
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_351eafd7f5d5900809b260a8f47801e1___void__unsigned_long_int_.0
mov dword [eax + 0x24], eax
mov eax, esp
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_c148d78b0dea76ac94e6bffeb8308db3___void__unsigned_long_int_.0
mov dword [eax + 0x24], eax
call fcn.00416e10
push 0x3e8
lea eax, [ebp - 0x7f0]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xd8
mov dword [ebp - 0xac0], 0x89ec8b55
xorps xmm0, xmm0
mov dword [ebp - 0xaa4], 0
lea eax, [ebp - 0xa68]
movq qword [ebp - 0xaac], xmm0
movups xmmword [ebp - 0xabc], xmm0
push 0xf0
push 0
push eax
mov dword [ebp - 0xaa0], 0
mov dword [ebp - 0xa9c], 0
mov dword [ebp - 0xa94], 0
mov dword [ebp - 0xa90], 0x7530
mov dword [ebp - 0xa8c], 0x186a0
mov dword [ebp - 0xa80], 0
mov dword [ebp - 0xa7c], 0
mov dword [ebp - 0xa78], 0
mov dword [ebp - 0xa74], 0
mov dword [ebp - 0xa70], 0xffffffff
mov dword [ebp - 0xa6c], 0
call sub.msvcrt.dll_memset
push 0xf0
lea eax, [ebp - 0x978]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x3c
lea eax, [ebp - 0x888]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [0x43c08c]
add esp, 0x24
mov dword [ebp - 0x84c], 0
mov dword [ebp - 0x848], 0
mov dword [ebp - 0xa88], eax
mov dword [ebp - 0xa98], 0
push 0
call fcn.0041ff80
push eax
lea eax, [ebp - 0x7f0]
push 0x1f4
push eax
call sub.msvcrt.dll_fgetws
add esp, 0x10
test eax, eax
je 0x40c1c0
lea esi, [ebp - 0x7f0]
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40bd00
sub esi, ecx
sar esi, 1
cmp esi, 1
jbe 0x40bcd1
push 0x3e8
lea eax, [ebp - 0x408]
push 0
push eax
call sub.msvcrt.dll_memset
xor edi, edi
dec esi
add esp, 0xc
mov dword [ebp - 0x800], edi
cmp esi, 1
jl 0x40bd81
nop dword [eax + eax]
cmp word [ebp + esi*2 - 0x7f0], 0x50
jne 0x40bd56
cmp word [ebp + esi*2 - 0x7f2], 0x2d
je 0x40bd5e
dec esi
cmp esi, 1
jge 0x40bd40
jmp 0x40bd81
lea eax, [ebp - 0x7ee]
lea eax, [eax + esi*2]
push eax
call sub.msvcrt.dll__wtoi
add esp, 4
mov dword [ebp - 0x800], eax
mov edi, eax
cmp esi, 1
je 0x40bcd1
sub esi, 2
test esi, esi
jle 0x40bda2
nop dword [eax + eax]
cmp word [ebp + esi*2 - 0x7f0], 0x20
jne 0x40bda0
dec esi
test esi, esi
jg 0x40bd90
test esi, esi
je 0x40bcd1
lea esi, [esi*2 + 2]
cmp esi, 0x3e8
jae 0x40c1c8
xor eax, eax
xor ecx, ecx
mov word [ebp + esi - 0x7f0], ax
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x7f0]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x40a], ax
test ax, ax
jne 0x40bdd0
lea eax, [ebp - 0x408]
push str.attach
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40be1d
sub esp, 0x18
mov ecx, esp
push 0x43178c
call fcn.00405320
push edi
call fcn.00416410
add esp, 0x1c
jmp 0x40bcd1
lea eax, [ebp - 0x408]
push str.detach
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40be43
push edi
call fcn.00414a50
add esp, 4
jmp 0x40bcd1
lea eax, [ebp - 0x408]
push str.find
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40c0a5
push 0x18
call fcn.0041eaaf
mov ecx, eax
mov dword [ebp - 0x804], eax
add esp, 4
mov dword [ebp - 0x7fc], ecx
test ecx, ecx
je 0x40beba
xorps xmm0, xmm0
mov dword [ebp - 0x7fc], eax
movq qword [ecx], xmm0
mov dword [ecx + 8], 0
mov dword [ecx + 4], 1
mov dword [ecx + 8], 1
mov dword [ecx], 0x4349b8
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
jmp 0x40bec8
xor ecx, ecx
mov dword [ebp - 0x804], ecx
mov dword [ebp - 0x7fc], ecx
or dword [ebp - 0x7f8], 1
lea edx, [ecx + 0xc]
mov dword [ebp - 0x81c], edx
mov dword [ebp - 0x818], ecx
mov dword [ebp - 4], 0
test ecx, ecx
je 0x40beed
lock inc dword [ecx + 4]
sub esp, 0x28
mov byte [ebp - 4], 2
mov eax, esp
mov dword [ebp - 0x83c], 0
sub esp, 0x280
mov dword [ebp - 0x838], 0
mov edi, esp
lea esi, [ebp - 0xac0]
mov dword [eax + 8], ecx
mov ecx, 0xa0
push dword [ebp - 0x800]
rep movsd dword es:[edi], dword [esi]
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_4b9ddcc1de7531d78269cf44235fa0cf___void__struct_HookParam__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___.0
mov dword [eax + 4], edx
mov dword [eax + 0x24], eax
call fcn.00414bc0
mov esi, dword [ebp - 0x804]
add esp, 0x2ac
jmp 0x40bf6c
mov dword [ebp - 4], 0
test esi, esi
je 0x40bf7b
lock inc dword [esi + 4]
mov eax, dword [ebp - 0x81c]
mov edi, esi
mov dword [ebp - 0x824], eax
mov dword [ebp - 0x820], edi
push 8
mov byte [ebp - 4], 4
call fcn.0041eaaf
add esp, 4
test eax, eax
je 0x40bfc0
mov ecx, dword [ebp - 0x81c]
xor edi, edi
mov dword [eax], ecx
mov dword [eax + 4], esi
mov dword [ebp - 0x824], 0
mov dword [ebp - 0x820], edi
jmp 0x40bfc2
xor eax, eax
mov ecx, dword [ebp - 0x7f8]
or ecx, 2
mov dword [ebp - 0x808], eax
mov dword [ebp - 0x7f8], ecx
lea ecx, [ebp - 0x80c]
mov byte [ebp - 4], 5
push ecx
push 0
push eax
push 0x403130
push 0
push 0
call sub.msvcrt.dll__beginthreadex
add esp, 0x18
mov dword [ebp - 0x810], eax
test eax, eax
je 0x40c094
mov ecx, dword [ebp - 0x80c]
mov byte [ebp - 4], 6
test ecx, ecx
je 0x40c08d
push ecx
push eax
call fcn.0041c00f
add esp, 8
test eax, eax
jne 0x40c08d
xorps xmm0, xmm0
movlpd qword [ebp - 0x810], xmm0
test edi, edi
je 0x40c050
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x40c050
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x40c050
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40bcd1
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x40bcd1
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x40bcd1
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
jmp 0x40bcd1
push 1
call fcn.0041c26e
push 6
mov dword [ebp - 0x80c], 0
call fcn.0041c26e
mov ax, word [ebp - 0x408]
cmp ax, 0x2d
jne 0x40c10a
lea eax, [ebp - 0x830]
mov dword [ebp - 4], 7
push eax
lea eax, [ebp - 0x408]
push str.__llu
push eax
call fcn.0040c1d0
push dword [ebp - 0x82c]
push dword [ebp - 0x830]
push edi
call fcn.004168c0
add esp, 0x18
mov dword [ebp - 4], 0xffffffff
jmp 0x40bcd1
cmp ax, 0x3d
jne 0x40c13b
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x408]
push 0x4349a4
push eax
call fcn.0040c1d0
mov eax, dword [ebp - 0x814]
add esp, 0xc
mov dword [0x43c08c], eax
jmp 0x40bcd1
cmp ax, 0x2b
jne 0x40c16c
lea eax, [ebp - 0x7f4]
push eax
lea eax, [ebp - 0x408]
push 0x4349ac
push eax
call fcn.0040c1d0
mov eax, dword [ebp - 0x7f4]
add esp, 0xc
mov dword [0x43c088], eax
jmp 0x40bcd1
sub esp, 0x18
lea eax, [ebp - 0x408]
mov ecx, esp
push eax
call fcn.00405320
lea eax, [ebp - 0x10c8]
push eax
call fcn.0040d450
add esp, 0x1c
cmp byte [ebp - 0xac8], 0
je 0x40c1c0
sub esp, 0x600
lea esi, [ebp - 0x10c8]
mov edi, esp
mov ecx, 0x180
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0x800]
call fcn.00416590
add esp, 0x604
jmp 0x40bcd1
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0041ec0f
int3