Function at 0x46833f
Capabilities:
Create thread

Disassembly:
mov eax, 0x4a13e5
call fcn.00497cb0
sub esp, 0x10c
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 4], ebx
cmp byte [0x4bbb6c], bl
mov dword [ebp - 0x10], esp
je 0x4683fb
push 0x468211
push str.Serv_U
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerA]
cmp eax, ebx
mov dword [0x4bbb84], eax
jne 0x468398
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
push 0x4a84a8
lea eax, [ebp - 0x44]
jmp 0x4685c3
lea ecx, [ebp - 0x2c]
xor edi, edi
push ecx
inc edi
push eax
mov dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x28], 2
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 0x1388
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x80], eax
jne 0x4683fe
mov eax, dword [0x4bbb70]
cmp eax, ebx
je 0x4683e2
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], ebx
push 0x4a84a8
lea eax, [ebp - 0x5c]
jmp 0x4685c3
xor edi, edi
inc edi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push edi
push ebx
call esi
cmp eax, ebx
mov dword [0x4bbb74], eax
jne 0x46842c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], ebx
push 0x4a84a8
lea eax, [ebp - 0x54]
jmp 0x4685c3
call fcn.00467fbd
cmp eax, 5
jne 0x46844b
lea eax, [ebp - 0x118]
push str.Global_
push eax
call sub.MSVCR71.dll_strcpy
pop ecx
pop ecx
jmp 0x468451
mov byte [ebp - 0x118], bl
lea eax, [ebp - 0x118]
push str.UniqueServUEvent_93570126297340819583
push eax
call sub.MSVCR71.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x118]
push eax
push ebx
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventA]
cmp eax, ebx
mov dword [0x4bbb70], eax
je 0x4684ac
push 0x840
push 2
push edi
mov dword [0x4bbb88], edi
call fcn.0041c9cf
add esp, 0xc
push 0x64
pop eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], ebx
push 0x4a84a8
lea eax, [ebp - 0x64]
jmp 0x4685c3
call fcn.0046802b
test al, al
je 0x4684ec
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], 0xc
mov dword [ebp - 0x68], ebx
push eax
jmp 0x4684f6
lea eax, [ebp - 0x118]
push eax
push ebx
push edi
push ebx
call esi
cmp eax, ebx
mov dword [0x4bbb70], eax
jne 0x46851a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], ebx
push 0x4a84a8
lea eax, [ebp - 0x34]
jmp 0x4685c3
mov edx, dword [0x4bb0d4]
cmp edx, edi
jle 0x46854f
cmp edi, edx
jge 0x46854f
mov eax, dword [edi*4 + 0x4bb0d8]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x46853b
cmp cl, 0x2d
jne 0x46854c
mov al, byte [eax + 1]
cmp al, 0x56
je 0x468546
cmp al, 0x76
jne 0x46854c
mov byte [0x4b9331], bl
inc edi
jmp 0x468524
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push 0x46863a
push 0x1000
push ebx
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
cmp eax, ebx
mov dword [0x4bbb78], eax
ja 0x468588
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ebx
push 0x4a84a8
lea eax, [ebp - 0x3c]
jmp 0x4685c3
cmp byte [0x4bbb6c], bl
mov byte [0x4bbb7d], 1
mov byte [0x4bbb7c], bl
je 0x4685c9
push ebx
push ebx
push 4
xor ecx, ecx
pop eax
call fcn.00468100
test eax, eax
pop ecx
pop ecx
jne 0x4685c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], ebx
push 0x4a84a8
lea eax, [ebp - 0x4c]
push eax
call sub.MSVCR71.dll__CxxThrowException
push 0xffffffffffffffff
push dword [0x4bbb74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x4bbb88], 2
jne 0x4685f1
push 0x843
push 2
push 3
call fcn.0041c9cf
add esp, 0xc
cmp dword [0x4bbb88], 3
jne 0x46860b
push 0x844
push 2
push 3
call fcn.0041c9cf
add esp, 0xc
xor eax, eax
push ebx
push eax
call fcn.00468190
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret