Function at 0x10022f40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x58
mov al, byte [ebp + 0xc]
mov ecx, dword [0x1007a00c]
xor ecx, ebp
mov dword [esp + 0x50], ecx
test al, al
je 0x10023197
mov al, byte [0x1007a230]
test al, 1
je 0x10023197
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.kernel32.dll_QueryPerformanceCounter]
push 0x1007b6a0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ecx, dword [0x1007b6ec]
mov eax, dword [0x1007b6e8]
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
cmp edx, eax
mov edi, esi
sbb edi, ecx
jl 0x10022fb1
mov dword [0x1007b6e8], edx
mov dword [0x1007b6ec], esi
mov eax, edx
mov ecx, esi
mov edx, 0x3e8
mul edx
mov dword [esp + 4], eax
imul edi, ecx, 0x3e8
add edi, edx
push 0x1007b6a0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov al, 1
mov dword [esp + 0x14], eax
call dword [sym.imp.kernel32.dll_GetTickCount64]
mov esi, eax
mov ecx, edx
mov ebx, dword [0x1007a228]
mov eax, ebx
mul esi
imul ecx, ebx
imul esi, dword [0x1007a22c]
add edx, ecx
add esi, edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0xc], edi
or esi, edi
mov dword [esp + 0x28], eax
mov edi, eax
or edi, dword [esp + 4]
mov eax, edi
or eax, esi
mov al, byte [esp + 0x3f]
mov byte [esp + 0x44], al
mov eax, dword [esp + 0x3b]
mov dword [esp + 0x40], eax
mov eax, dword [0x1007b660]
mov dword [esp + 0x10], eax
sete byte [esp + 3]
mov ecx, dword [0x1007b66c]
mov ebx, dword [0x1007b668]
mov eax, ebx
mov edx, ecx
lock cmpxchg8b qword [0x1007b668]
mov dword [esp + 0x24], ecx
xor edx, ecx
mov dword [esp + 0x20], ebx
xor eax, ebx
or eax, edx
jne 0x1002302d
mov ecx, dword [0x1007b674]
mov ebx, dword [0x1007b670]
mov eax, ebx
mov edx, ecx
lock cmpxchg8b qword [0x1007b670]
xor edx, ecx
xor eax, ebx
or eax, edx
jne 0x10023055
cmp dword [esp + 0x10], 0
setne byte [esp + 0xb]
mov dword [esp + 0x30], ebx
mov eax, ebx
or eax, dword [esp + 0x20]
mov dword [esp + 0x34], ecx
or ecx, dword [esp + 0x24]
mov edx, eax
or edx, ecx
sete byte [esp + 0xa]
cmp byte [0x1007b628], 0
jne 0x100231ae
or eax, edi
or ecx, esi
or ecx, eax
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0xc]
je 0x10023144
cmp dword [esp + 0x10], 0
sete al
mov esi, dword [esp + 0x30]
sub esi, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
sbb edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
xor cl, 1
or cl, al
jne 0x10023191
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x20]
sub eax, edi
mov ecx, dword [esp + 0x24]
sbb ecx, ebx
cmp byte [0x1007b680], 0
jne 0x10023130
mov edx, eax
sub edx, esi
mov dword [esp + 0x1c], esi
mov esi, ecx
sbb esi, dword [esp + 0x10]
mov edi, esi
sar edi, 0x1f
add edx, edi
adc esi, edi
xor esi, edi
xor edx, edi
mov edi, dword [0x1007b68c]
mov ebx, dword [0x1007b688]
cmp ebx, edx
mov dword [esp + 0x18], edi
sbb edi, esi
jl 0x10023220
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0xc]
xor edx, edx
neg eax
sbb edx, ecx
jl 0x100231ed
lea eax, [esp + 0x40]
xor ecx, ecx
mov esi, dword [ebp + 8]
mov edx, dword [esp + 0x28]
mov dword [esi], edx
mov edx, dword [esp + 0x2c]
mov dword [esi + 4], edx
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
mov byte [esi + 0x10], cl
mov cl, byte [esp + 3]
mov byte [esi + 0x11], cl
mov ecx, dword [esp + 0x14]
mov byte [esi + 0x12], cl
mov ecx, dword [eax]
mov dword [esi + 0x13], ecx
mov al, byte [eax + 4]
mov byte [esi + 0x17], al
mov ecx, dword [esp + 0x50]
xor ecx, ebp
call fcn.1002cad0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, esi
mov ecx, edx
jmp 0x10023138
mov dword [esp + 0x14], 0
mov dword [esp + 4], 0
xor edi, edi
jmp 0x10022fd5
or eax, ecx
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0xc]
je 0x10023144
mov eax, dword [esp + 0x30]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
mov al, byte [esp + 0xa]
mov byte [esp + 3], al
mov al, byte [esp + 0xb]
mov dword [esp + 0x14], eax
mov cl, 1
lea eax, [esp + 0x4b]
jmp 0x1002314a
mov eax, dword [esp + 0x30]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
mov al, byte [esp + 0xa]
mov byte [esp + 3], al
mov al, byte [esp + 0xb]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x4b]
mov cl, 1
jmp 0x1002314a
sub edx, ebx
sbb esi, dword [esp + 0x18]
mov edi, dword [0x1007b694]
cmp dword [0x1007b690], edx
sbb edi, esi
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0xc]
jge 0x10023138
mov ecx, dword [esp + 0x10]
mov eax, ecx
sar eax, 0x1f
mov edx, dword [esp + 0x1c]
add edx, eax
adc ecx, eax
mov bl, byte [0x1007a230]
test bl, 1
je 0x10023312
xor edx, eax
xor ecx, eax
cmp edx, dword [0x1007b698]
sbb ecx, dword [0x1007b69c]
jge 0x10023312
call dword [sym.imp.kernel32.dll_GetTickCount64]
mov ebx, eax
mov ecx, edx
mov eax, dword [0x1007a228]
imul ecx, eax
mul ebx
mov esi, eax
add edx, ecx
imul ebx, dword [0x1007a22c]
add ebx, edx
push 0x1007b6a0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ecx, dword [0x1007b6bc]
mov eax, dword [0x1007b6b8]
mov dword [esp + 0x18], esi
cmp esi, eax
mov edx, ebx
sbb edx, ecx
mov edi, dword [0x1007b6c4]
mov esi, dword [0x1007b6c0]
jae 0x100232f5
mov edx, dword [esp + 0x18]
not edx
add eax, edx
mov edx, ebx
not edx
adc ecx, edx
add eax, esi
adc ecx, edi
push edi
push esi
push ecx
push eax
call fcn.1002d8e0
mov ecx, edx
cmp eax, 5
sbb edx, 0
jb 0x1002331f
mov byte [0x1007a230], 0
jmp 0x10023307
add esi, dword [esp + 0x18]
adc edi, ebx
mov dword [0x1007b6b8], esi
mov dword [0x1007b6bc], edi
push 0x1007b6a0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
jmp 0x10023130
add eax, 1
adc ecx, 0
imul edi, eax
mul esi
add edx, edi
imul ecx, esi
add ecx, edx
add eax, dword [esp + 0x18]
adc ecx, ebx
mov dword [0x1007b6b8], eax
mov dword [0x1007b6bc], ecx
jmp 0x10023307