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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4d9164]
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 0x469972
cmp dword [edi + 8], 2
je 0x469972
or eax, 2
mov dword [ebp - 0x1c], eax
mov esi, dword [edi + 4]
test esi, esi
je 0x4699d2
cmp dword [esi], 0
je 0x4699d2
mov eax, dword fs:[0x2c]
mov ecx, dword [0x4dd320]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x4dd1f0]
cmp eax, dword [ecx + 0x58]
jg 0x469c42
movzx ecx, word [ebx]
mov esi, ebx
mov edx, ebx
test cx, cx
je 0x4699c9
nop word [eax + eax]
xor cl, byte [0x4dd1ec]
lea edx, [edx + 1]
add esi, 2
mov byte [edx - 1], cl
movzx eax, word [esi]
mov cl, al
test ax, ax
jne 0x4699b0
mov eax, dword [ebp - 0x1c]
sub esi, ebx
sar esi, 1
jmp 0x4699d4
xor esi, esi
test al, 1
je 0x4699e2
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x1c]
test al, 2
je 0x469ac9
test esi, esi
je 0x4699fc
push esi
push ebx
mov ecx, edi
call fcn.00464f90
jmp 0x469ac6
mov eax, dword [0x4dd320]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x4dd270]
cmp eax, dword [ecx + 0x58]
jg 0x469c7e
cmp dword [0x4dd26c], 0
jg 0x469a40
jl 0x469a30
cmp dword [0x4dd268], 0
jae 0x469a40
push 0
push ebx
lea ecx, [edi + 0x30]
call fcn.00456550
jmp 0x469ac6
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.00456550
test al, al
je 0x469ac6
lea edx, [edi + 0x2c]
mov ecx, 1
mov dword [ebp - 0x20], edx
xor eax, eax
lock cmpxchg dword [edx], ecx
cmp eax, 1
je 0x469ac6
mov eax, dword [esi]
xchg dword [esi], eax
mov edx, dword [ebp - 0x24]
cmp eax, edx
je 0x469a85
mov ecx, dword [ebp - 0x20]
jmp 0x469ac2
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.00460060
mov ecx, dword [ebp - 0x24]
call fcn.00465790
test al, al
je 0x469ab8
mov eax, dword [ebp - 0x24]
xchg dword [esi], eax
mov ecx, edi
call fcn.004683e0
lea ecx, [edi + 0x2c]
xor eax, eax
xchg dword [ecx], eax
mov eax, dword [ebp - 0x1c]
test al, 4
je 0x469b5a
mov esi, dword [0x4dcfa8]
mov edx, dword [esi]
cmp edx, 0xffffffff
jne 0x469b25
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount64]
call edi
mov ecx, dword [esi + 4]
add ecx, 0x2710
cmp eax, ecx
jbe 0x469b5a
mov edx, dword [esi]
cmp edx, 0xffffffff
jne 0x469b25
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 0x469b5a
mov ecx, ebx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x469b30
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 0x469c31
mov edi, dword [0x4dcfc8]
mov eax, dword [edi + 8]
lea esi, [edi + 8]
or eax, dword [esi + 4]
jne 0x469be2
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
test eax, eax
je 0x469be2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EventRegister
push eax
call esi
push str.EventUnregister
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 0x469bd1
cmp dword [edi + 0x14], 0
je 0x469bd1
test eax, eax
je 0x469bd1
lea esi, [edi + 8]
push esi
push 0
push 0
push 0x4b6c08
call ecx
jmp 0x469be2
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 0x469c31
mov ecx, ebx
lea eax, [ecx + 2]
mov dword [ebp - 0x20], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x469bf3
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 0x4b6c18
push edx
push dword [esi]
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004810ea
mov esp, ebp
pop ebp
ret
push 0x4dd1f0
call fcn.004812aa
add esp, 4
cmp dword [0x4dd1f0], 0xffffffff
jne 0x46999e
mov al, byte [esi + 1]
sub al, byte [esi + 3]
sub al, byte [esi + 2]
add al, byte [esi]
push 0x4dd1f0
mov byte [0x4dd1ec], al
call fcn.00481260
add esp, 4
jmp 0x46999e
push 0x4dd270
call fcn.004812aa
add esp, 4
cmp dword [0x4dd270], 0xffffffff
jne 0x469a1c
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
push 0x4dd270
mov dword [0x4dd268], eax
mov dword [0x4dd26c], ecx
call fcn.00481260
add esp, 4
jmp 0x469a1c