Function at 0x4bee00
Capabilities:
Encode data using xor
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x54c154]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 8
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
jne 0x4bee32
cmp dword [edi + 8], 2
je 0x4bee32
or eax, 2
mov dword [ebp - 0x1c], eax
mov esi, dword [edi + 4]
test esi, esi
je 0x4bee92
cmp dword [esi], 0
je 0x4bee92
mov eax, dword fs:[0x2c]
mov ecx, dword [0x5567e8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x556c20]
cmp eax, dword [ecx + 8]
jg 0x4bf102
movzx ecx, word [ebx]
mov esi, ebx
mov edx, ebx
test cx, cx
je 0x4bee89
nop word [eax + eax]
xor cl, byte [0x556c1c]
lea edx, [edx + 1]
add esi, 2
mov byte [edx - 1], cl
movzx eax, word [esi]
mov cl, al
test ax, ax
jne 0x4bee70
mov eax, dword [ebp - 0x1c]
sub esi, ebx
sar esi, 1
jmp 0x4bee94
xor esi, esi
test al, 1
je 0x4beea2
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x1c]
test al, 2
je 0x4bef89
test esi, esi
je 0x4beebc
push esi
push ebx
mov ecx, edi
call fcn.004ba540
jmp 0x4bef86
mov eax, dword [0x5567e8]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x556ca0]
cmp eax, dword [ecx + 8]
jg 0x4bf13e
cmp dword [0x556c9c], 0
jg 0x4bef00
jl 0x4beef0
cmp dword [0x556c98], 0
jae 0x4bef00
push 0
push ebx
lea ecx, [edi + 0x30]
call fcn.004aa150
jmp 0x4bef86
mov eax, dword [edi + 0xa0]
lea esi, [edi + 0xa0]
xchg dword [esi], eax
push 0
push ebx
mov ecx, eax
mov dword [ebp - 0x24], eax
call fcn.004aa150
test al, al
je 0x4bef86
lea edx, [edi + 0x2c]
mov ecx, 1
mov dword [ebp - 0x20], edx
xor eax, eax
lock cmpxchg dword [edx], ecx
cmp eax, 1
je 0x4bef86
mov eax, dword [esi]
xchg dword [esi], eax
mov edx, dword [ebp - 0x24]
cmp eax, edx
je 0x4bef45
mov ecx, dword [ebp - 0x20]
jmp 0x4bef82
lea eax, [edi + 0x30]
mov dword [ebp - 0x20], 0x68
cmp edx, eax
mov ecx, 0x30
cmove ecx, dword [ebp - 0x20]
lea eax, [edi + ecx]
mov ecx, eax
mov dword [ebp - 0x24], eax
call fcn.004b4510
mov ecx, dword [ebp - 0x24]
call fcn.004bada0
test al, al
je 0x4bef78
mov eax, dword [ebp - 0x24]
xchg dword [esi], eax
mov ecx, edi
call fcn.004bd5a0
lea ecx, [edi + 0x2c]
xor eax, eax
xchg dword [ecx], eax
mov eax, dword [ebp - 0x1c]
test al, 4
je 0x4bf01a
mov esi, dword [0x556a58]
mov edx, dword [esi]
cmp edx, 0xffffffff
jne 0x4befe5
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount64]
call edi
mov ecx, dword [esi + 4]
add ecx, 0x2710
cmp eax, ecx
jbe 0x4bf01a
mov edx, dword [esi]
cmp edx, 0xffffffff
jne 0x4befe5
push 0
push 0x80
push 3
push 0
push 7
push 0xc0000000
push str..GlobalProcmonDebugLogger
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
call edi
mov edx, dword [esi]
mov dword [esi + 4], eax
cmp edx, 0xffffffff
je 0x4bf01a
mov ecx, ebx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4beff0
push 0
sub ecx, esi
lea eax, [ebp - 0x18]
push eax
push 0
sar ecx, 1
push 0
lea eax, [ecx + ecx]
push eax
push ebx
push 0x95358204
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test byte [ebp - 0x1c], 8
je 0x4bf0f1
mov edi, dword [0x556a78]
mov eax, dword [edi + 8]
lea esi, [edi + 8]
or eax, dword [esi + 4]
jne 0x4bf0a2
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
test eax, eax
je 0x4bf0a2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x513c64
push eax
call esi
push 0x513c74
push dword [edi]
mov dword [edi + 0x10], eax
call esi
push str.EventWrite
push dword [edi]
mov dword [edi + 0x14], eax
call esi
mov ecx, dword [edi + 0x10]
mov dword [edi + 0x18], eax
test ecx, ecx
je 0x4bf091
cmp dword [edi + 0x14], 0
je 0x4bf091
test eax, eax
je 0x4bf091
lea esi, [edi + 8]
push esi
push 0
push 0
push 0x5137a4
call ecx
jmp 0x4bf0a2
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi], 0
lea esi, [edi + 8]
mov eax, dword [esi]
mov edx, dword [esi + 4]
or eax, edx
je 0x4bf0f1
mov ecx, ebx
lea eax, [ecx + 2]
mov dword [ebp - 0x20], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4bf0b3
sub ecx, dword [ebp - 0x20]
sar ecx, 1
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
lea eax, [ecx*2 + 2]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [edi + 0x18]
push 1
push 0x5137b8
push edx
push dword [esi]
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a44cd
mov esp, ebp
pop ebp
ret
push 0x556c20
call fcn.004a4a41
add esp, 4
cmp dword [0x556c20], 0xffffffff
jne 0x4bee5e
mov al, byte [esi + 1]
sub al, byte [esi + 3]
sub al, byte [esi + 2]
add al, byte [esi]
push 0x556c20
mov byte [0x556c1c], al
call fcn.004a49f7
add esp, 4
jmp 0x4bee5e
push 0x556ca0
call fcn.004a4a41
add esp, 4
cmp dword [0x556ca0], 0xffffffff
jne 0x4beedc
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
push 0x556ca0
mov dword [0x556c98], eax
mov dword [0x556c9c], ecx
call fcn.004a49f7
add esp, 4
jmp 0x4beedc