Function at 0x4a7320
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x581fde
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5fb61c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 8], ebx
je 0x4a75c9
test byte [0x5ffc90], 1
jne 0x4a73be
or dword [0x5ffc90], 1
push 0x18
mov dword [ebp - 4], ebx
mov dword [0x5ffc88], ebx
call fcn.0042bfa0
add esp, 4
cmp eax, ebx
je 0x4a744c
mov dword [0x5ffc84], eax
mov dword [eax], eax
mov eax, dword [0x5ffc84]
mov dword [eax + 4], eax
mov eax, dword [0x5ffc84]
mov dword [eax + 8], eax
mov eax, dword [0x5ffc84]
mov byte [eax + 0x14], 1
mov ecx, dword [0x5ffc84]
push 0x58f740
mov byte [ecx + 0x15], 1
call fcn.00535252
add esp, 4
mov dword [ebp - 4], 0xffffffff
cmp dword [0x5ffc88], ebx
jne 0x4a7406
mov ecx, 0x5ff680
call fcn.00462590
test eax, eax
mov eax, 0x5931b8
jne 0x4a73de
mov eax, 0x5931b0
push ebx
lea ecx, [ebp - 0x20]
push ecx
mov ecx, 0x5ffc80
mov dword [ebp - 0x20], 0x5a9808
mov dword [ebp - 0x1c], eax
call fcn.004a69c0
push eax
lea edx, [ebp - 0x20]
push edx
mov ecx, 0x5ffc80
call fcn.0049a9c0
mov eax, dword [0x5fcb00]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcb00
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
mov eax, dword [0x5fcb00]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcb00
mov dword [ebp - 4], 1
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
sub eax, ebx
mov byte [ebp - 4], 2
je 0x4a7470
dec eax
jne 0x4a747d
push str.silent
jmp 0x4a7475
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x14], ebx
call fcn.005348e5
push 0x5d65a8
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], vtable.std::bad_alloc.0
call fcn.00533e7f
push str.normal
lea ecx, [ebp - 0x10]
call fcn.00442cf0
mov eax, dword [ebp + 0xc]
sub eax, ebx
je 0x4a748e
dec eax
jne 0x4a749b
push 0x5a97f4
jmp 0x4a7493
push str.start
lea ecx, [ebp - 0x14]
call fcn.00442cf0
push 4
call fcn.0042bfa0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4a74c1
mov eax, dword [0x5fcb00]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcb00
call edx
add eax, 0x10
mov dword [esi], eax
jmp 0x4a74c3
xor esi, esi
push str.uninstall
lea ecx, [ebp + 8]
call fcn.00422540
sub esp, 0x10
mov dword [ebp - 0x1c], esp
mov ecx, esp
mov bl, 3
push 0x5ffc80
mov byte [ebp - 4], bl
call fcn.004a6b10
push 0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.004a6be0
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.004222b0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a752e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a7551
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0
push 0
push esi
push 0x4a6520
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [ebp + 0xc], 1
mov esi, eax
jne 0x4a7579
push 0x7d0
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a75a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a75c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8