Function at 0x40c050
Capabilities:
Get common file path
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x48afcb
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x4b185c]
xor eax, esp
mov dword [esp + 0x424], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b185c]
xor eax, esp
push eax
lea eax, [esp + 0x43c]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
cmp dword [ebx + 4], edi
je 0x40c09b
mov al, 1
jmp 0x40c267
mov dword [esp + 0x14], edi
mov dword [esp + 0x444], edi
mov esi, 1
lea ecx, [esp + 0x14]
cmp dword [ebx + 8], esi
jne 0x40c0bb
push str.SYSTEMCurrentControlSetServicesEventlogApplication_
jmp 0x40c0c0
push str.SYSTEMCurrentControlSetServicesEventlogSystem_
call fcn.00402890
lea ebp, [ebx + 0xc]
push ebp
lea ecx, [esp + 0x18]
call fcn.00402af0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edi
push 0xf003f
push edi
push edi
push edi
lea ecx, [esp + 0x30]
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], edi
call fcn.00402270
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, edi
jne 0x40c1f9
cmp dword [esp + 0x1c], esi
jne 0x40c1ee
push 0x104
lea edx, [esp + 0x234]
push edx
mov dword [esp + 0x28], 7
mov dword [esp + 0x2c], 2
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x230]
mov word [esp + eax + 0x28], cx
add eax, 2
cmp cx, di
jne 0x40c140
lea eax, [esp + 0x28]
call fcn.0040c350
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40c165
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea ecx, [esp + 0x2c]
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push edi
push str.EventMessageFile
push edx
call esi
mov ecx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x24]
push eax
push 4
push edi
push str.TypesSupported
push ecx
call esi
lea eax, [esp + 0x28]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40c1b0
mov ecx, dword [esp + 0x18]
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x2c]
push eax
push 1
push edi
push str.CategoryMessageFile
push ecx
call esi
mov eax, dword [esp + 0x18]
push 4
lea edx, [esp + 0x28]
push edx
push 4
push edi
push str.CategoryCount
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, ebp
call fcn.00402270
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebx + 4], eax
cmp eax, edi
setne bl
mov dword [esp + 0x444], 0xffffffff
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x40c265
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40c261
mov eax, dword [esp + 0x14]
mov esi, eax
cmp eax, edi
je 0x40c261
mov eax, dword [eax + 4]
cmp eax, edi
je 0x40c248
push eax
call fcn.0046b365
add esp, 4
mov eax, dword [esi + 8]
cmp eax, edi
je 0x40c258
push eax
call fcn.0046b365
add esp, 4
push esi
call fcn.004553b4
add esp, 4
mov dword [esp + 0x14], edi
mov al, bl
mov ecx, dword [esp + 0x43c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x424]
xor ecx, esp
call fcn.0046a0d3
add esp, 0x434
ret