Function at 0x50bc19c9
Capabilities:
Accept command line arguments
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x130], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [esp + 0x10], eax
mov eax, dword [0x50bc4380]
or eax, dword [0x50bc4384]
push edi
mov edi, ecx
mov dword [esp + 0xc], edi
jne 0x50bc1af8
cmp byte [0x50bc4374], al
jne 0x50bc1a9a
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x50bc1a38
cmp dword [esp + 0x24], 6
setb al
mov byte [0x50bc4375], al
test al, al
jne 0x50bc1a93
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
je 0x50bc1a8c
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EventWrite
push esi
call ebx
mov dword [0x50bc4378], eax
test eax, eax
je 0x50bc1a8c
push str.EventRegister
push esi
call ebx
mov dword [0x50bc4048], eax
test eax, eax
je 0x50bc1a82
push str.EventUnregister
push esi
call ebx
mov dword [0x50bc437c], eax
test eax, eax
jne 0x50bc1a93
mov dword [0x50bc4048], 0x50bc15f4
mov byte [0x50bc4375], 1
mov byte [0x50bc4374], 1
cmp byte [0x50bc4375], 0
jne 0x50bc1abf
push 0x50bc4380
push 0x50bc4388
push 0x50bc15a4
push 0x50bc3464
call dword [0x50bc4048]
jmp 0x50bc1af8
mov ecx, 0x50bc4388
mov eax, ecx
cdq
push ecx
mov dword [0x50bc4384], edx
xor edx, edx
push edx
push edx
mov dword [esp + 0x28], edx
lea edx, [esp + 0x24]
push edx
push 1
mov dword [0x50bc4380], eax
mov eax, 0x50bc3464
push eax
push ecx
push 0x50bc1539
mov dword [esp + 0x38], eax
call dword [sym.imp.ADVAPI32.dll_RegisterTraceGuidsW]
xor edx, edx
mov ebx, 0x80000000
cmp dword [0x50bc43ac], edx
je 0x50bc1b56
mov al, byte [0x50bc43b0]
cmp byte [0x50bc4375], dl
je 0x50bc1b1c
cmp al, 4
jae 0x50bc1b48
test al, al
jmp 0x50bc1b46
cmp al, 4
jae 0x50bc1b24
test al, al
jne 0x50bc1b56
mov ecx, dword [0x50bc439c]
and ecx, ebx
xor eax, eax
or eax, ecx
je 0x50bc1b56
mov ecx, dword [0x50bc43a4]
mov eax, ecx
and eax, ebx
cmp edx, dword [0x50bc43a0]
jne 0x50bc1b56
cmp eax, ecx
jne 0x50bc1b56
call fcn.50bc1f20
push edx
push eax
call fcn.50bc175b
pop ecx
pop ecx
mov eax, fcn.50bc123c
test eax, eax
jne 0x50bc1b63
xor esi, esi
jmp 0x50bc1bc3
push 0xb0
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x50bc1bc3
lea eax, [esi + 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
call fcn.50bc1913
mov dword [esi + 0x88], edi
lea edi, [esi + 0x94]
push edi
push dword [esp + 0x10]
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
lea ecx, [esp + 0xc]
push ecx
push esi
push dword [edi]
mov dword [esi + 0x90], eax
push eax
call fcn.50bc123c
add esp, 0x10
mov byte [esi + 0x8e], al
mov eax, esi
call fcn.50bc18ae
test al, al
jne 0x50bc1bd8
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
jmp 0x50bc1c0b
xor edi, edi
cmp dword [esp + 0xc], edi
je 0x50bc1c05
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x50bc1bfb
push esi
push dword [esp + 0x18]
call eax
jmp 0x50bc1c0b
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xc], eax
cmp eax, edi
je 0x50bc1cc9
mov eax, esi
call fcn.50bc18ae
test al, al
je 0x50bc1cbf
cmp dword [esi + 4], 1
jne 0x50bc1cbf
cmp dword [0x50bc43ac], edi
je 0x50bc1cbf
cmp byte [0x50bc4375], 0
mov al, byte [0x50bc43b0]
je 0x50bc1c52
cmp al, 4
jae 0x50bc1c80
test al, al
jmp 0x50bc1c7e
cmp al, 4
jae 0x50bc1c5a
test al, al
jne 0x50bc1cbf
mov ecx, dword [0x50bc439c]
and ecx, ebx
xor eax, eax
or eax, ecx
je 0x50bc1cbf
mov ecx, dword [0x50bc43a4]
mov eax, ecx
xor edx, edx
and eax, ebx
cmp edx, dword [0x50bc43a0]
jne 0x50bc1cbf
cmp eax, ecx
jne 0x50bc1cbf
call fcn.50bc1889
mov edi, eax
sub edi, dword [esi + 0xa8]
mov ebx, edx
sbb ebx, dword [esi + 0xac]
call fcn.50bc1889
sub eax, dword [esi + 0xa0]
push ebx
sbb edx, dword [esi + 0xa4]
push edi
push edx
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.50bc17d8
add esp, 0x18
xor edi, edi
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, edi
je 0x50bc1cd6
mov ebx, esi
call fcn.50bc18d3
xor edi, edi
cmp byte [0x50bc4374], 0
je 0x50bc1d2c
mov esi, dword [0x50bc4380]
mov eax, dword [0x50bc4384]
mov ecx, esi
or ecx, eax
je 0x50bc1d2c
cmp byte [0x50bc4375], 0
jne 0x50bc1d03
push eax
push esi
call dword [0x50bc437c]
jmp 0x50bc1d20
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_UnregisterTraceGuids]
mov dword [esi + 0x20], edi
mov byte [esi + 0x28], 0
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [0x50bc4380], edi
mov dword [0x50bc4384], edi
mov ecx, dword [esp + 0x13c]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.50bc2205
mov esp, ebp
pop ebp
ret 4