Function at 0x40b560
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44817c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x149c
call fcn.004372c0
mov eax, dword [0x45d198]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push 0x20000
push 1
mov dword [ebp - 0x7f0], 0
call fcn.00438b80
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.00438b80
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.0040bc30
push 1
call fcn.00438b80
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_525527506beabf3234ac1548301fc36c___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_cd9d3822cd68d222ba4922352479bde3___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_1ec6461675f3a64111cf387ad193c2d5___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_452565c82e880f13d8a9b884f0c05ef0___void__unsigned_long_int_.0
mov dword [eax + 0x24], eax
mov eax, esp
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_d311f633eba90af617e50be66d3c344d___void__unsigned_long_int_.0
mov dword [eax + 0x24], eax
call fcn.00419190
push 0x3e8
lea eax, [ebp - 0x7e4]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xd8
mov dword [ebp - 0xa9c], 0x89ec8b55
xorps xmm0, xmm0
mov dword [ebp - 0xa80], 0
lea eax, [ebp - 0xa48]
movq qword [ebp - 0xa88], xmm0
movups xmmword [ebp - 0xa98], xmm0
push 0x224
push 0
push eax
mov dword [ebp - 0xa7c], 0
mov dword [ebp - 0xa78], 0
mov dword [ebp - 0xa70], 0
mov dword [ebp - 0xa6c], 0x7530
mov dword [ebp - 0xa68], 0x186a0
movq qword [ebp - 0xa5c], xmm0
mov dword [ebp - 0xa54], 0
mov dword [ebp - 0xa50], 0
mov dword [ebp - 0xa4c], 0xffffffff
call sub.msvcrt.dll_memset
mov eax, dword [0x45d064]
mov dword [ebp - 0xa64], eax
mov dword [ebp - 0xa74], 0
add esp, 0xc
push 0
call fcn.00438b80
push eax
lea eax, [ebp - 0x7e4]
push 0x1f4
push eax
call sub.msvcrt.dll_fgetws
add esp, 0x10
test eax, eax
je 0x40bbf1
lea esi, [ebp - 0x7e4]
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40b730
sub esi, ecx
sar esi, 1
cmp esi, 1
jbe 0x40b702
push 0x3e8
lea eax, [ebp - 0x3fc]
push 0
push eax
call sub.msvcrt.dll_memset
xor edi, edi
dec esi
add esp, 0xc
mov dword [ebp - 0x7f4], edi
cmp esi, 1
jl 0x40b7b1
nop dword [eax + eax]
cmp word [ebp + esi*2 - 0x7e4], 0x50
jne 0x40b786
cmp word [ebp + esi*2 - 0x7e6], 0x2d
je 0x40b78e
dec esi
cmp esi, 1
jge 0x40b770
jmp 0x40b7a8
lea eax, [ebp - 0x7e2]
lea eax, [eax + esi*2]
push eax
call sub.msvcrt.dll__wtoi
add esp, 4
mov dword [ebp - 0x7f4], eax
mov edi, eax
cmp esi, 1
je 0x40b702
sub esi, 2
test esi, esi
jle 0x40b7d2
nop dword [eax + eax]
cmp word [ebp + esi*2 - 0x7e4], 0x20
jne 0x40b7d0
dec esi
test esi, esi
jg 0x40b7c0
test esi, esi
je 0x40b702
lea esi, [esi*2 + 2]
cmp esi, 0x3e8
jae 0x40bbf9
xor eax, eax
xor ecx, ecx
mov word [ebp + esi - 0x7e4], ax
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x7e4]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x3fe], ax
test ax, ax
jne 0x40b800
lea eax, [ebp - 0x3fc]
push str.attach
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40b85b
sub esp, 0x18
mov ecx, esp
push eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], 7
push 0x44b8e8
mov word [ecx], ax
call fcn.0040a970
push edi
call fcn.00418770
add esp, 0x1c
jmp 0x40b702
lea eax, [ebp - 0x3fc]
push str.detach
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40b881
push edi
call fcn.004172b0
add esp, 4
jmp 0x40b702
lea eax, [ebp - 0x3fc]
push str.find
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x40baee
push 0x18
call fcn.0043730f
add esp, 4
mov dword [ebp - 0x7f8], eax
mov dword [ebp - 0x7e8], eax
test eax, eax
je 0x40b8e2
mov dword [eax + 4], 1
mov dword [eax + 8], 1
mov dword [eax], 0x44ed04
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
jmp 0x40b8ea
xor eax, eax
mov dword [ebp - 0x7f8], eax
or dword [ebp - 0x7f0], 1
lea ecx, [eax + 0xc]
mov dword [ebp - 0x7e8], eax
mov dword [ebp - 0x818], ecx
mov dword [ebp - 0x814], eax
sub esp, 0x28
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov edx, esp
test eax, eax
je 0x40b91e
lock inc dword [eax + 4]
mov dword [edx], vtable.std::_Func_impl_no_alloc_class__lambda_8da31c867f3d1da9edc434c6188f9be3___void__struct_HookParam__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___.0
lea esi, [ebp - 0xa9c]
sub esp, 0x278
mov dword [edx + 4], ecx
mov edi, esp
mov dword [edx + 8], eax
mov ecx, 0x9e
mov dword [edx + 0x24], edx
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0x7f4]
call fcn.00417440
mov edi, dword [ebp - 0x7f8]
add esp, 0x2a4
jmp 0x40b97a
mov dword [ebp - 4], 0
test edi, edi
je 0x40b989
lock inc dword [edi + 4]
mov esi, dword [ebp - 0x818]
mov eax, edi
mov dword [ebp - 0x808], esi
mov dword [ebp - 0x804], eax
push 8
mov byte [ebp - 4], 3
call fcn.0043730f
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x40b9ca
xor eax, eax
mov dword [ecx], esi
mov dword [ecx + 4], edi
mov dword [ebp - 0x808], 0
mov dword [ebp - 0x804], eax
jmp 0x40b9cc
xor ecx, ecx
or dword [ebp - 0x7f0], 2
mov dword [ebp - 0x7e8], ecx
lea eax, [ebp - 0x7e8]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x800]
push eax
call fcn.00402800
mov esi, dword [ebp - 0x7e8]
add esp, 8
test esi, esi
je 0x40ba38
mov ecx, dword [esi + 4]
mov dword [ebp - 0x7e8], ecx
test ecx, ecx
je 0x40ba2d
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
jne 0x40ba2d
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x7e8]
or eax, 0xffffffff
lock xadd dword [ecx + 8], eax
jne 0x40ba2d
mov eax, dword [ecx]
call dword [eax + 4]
push 8
push esi
call fcn.0043733f
add esp, 8
mov eax, dword [ebp - 0x7fc]
mov byte [ebp - 4], 5
test eax, eax
jne 0x40ba56
push 1
call fcn.0041f2d3
mov eax, dword [ebp - 0x7fc]
add esp, 4
push eax
push dword [ebp - 0x800]
call fcn.0041e9f2
add esp, 8
test eax, eax
je 0x40ba72
push eax
call fcn.0041f2a6
add esp, 4
mov esi, dword [ebp - 0x804]
mov dword [ebp - 0x800], 0
mov dword [ebp - 0x7fc], 0
test esi, esi
je 0x40bab1
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x40bab1
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x40bab1
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x40b702
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x40b702
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x40b702
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
jmp 0x40b702
mov ax, word [ebp - 0x3fc]
cmp ax, 0x2d
jne 0x40bb41
lea eax, [ebp - 0x820]
mov dword [ebp - 4], 6
push eax
lea eax, [ebp - 0x3fc]
push str.__llu
push eax
call fcn.0040bc00
push dword [ebp - 0x81c]
push dword [ebp - 0x820]
push edi
call fcn.00418d40
add esp, 0x18
mov dword [ebp - 4], 0xffffffff
jmp 0x40b702
cmp ax, 0x3d
jne 0x40bb6f
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0x3fc]
push 0x44ecd4
push eax
call fcn.0040bc00
mov eax, dword [ebp - 0x80c]
mov dword [0x45d064], eax
jmp 0x40b6ff
cmp ax, 0x2b
jne 0x40bb9d
lea eax, [ebp - 0x7ec]
push eax
lea eax, [ebp - 0x3fc]
push 0x44ecdc
push eax
call fcn.0040bc00
mov eax, dword [ebp - 0x7ec]
mov dword [0x45d060], eax
jmp 0x40b6ff
sub esp, 0x18
lea eax, [ebp - 0x3fc]
mov ecx, esp
push eax
call fcn.00404290
lea eax, [ebp - 0x14ac]
push eax
call fcn.0040e040
add esp, 0x1c
cmp byte [ebp - 0xaa4], 0
je 0x40bbf1
sub esp, 0xa08
lea esi, [ebp - 0x14ac]
mov edi, esp
mov ecx, 0x282
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0x7f4]
call fcn.004189d0
add esp, 0xa0c
jmp 0x40b702
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0043746e
int3