Function at 0x10046010
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x58
mov ecx, dword [0x1007a00c]
mov al, byte [ebp + 0xc]
xor ecx, ebp
test al, al
mov dword [esp + 0x50], ecx
je 0x10046222
mov al, byte [0x1007a230]
test al, 1
je 0x10046222
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.kernel32.dll_QueryPerformanceCounter]
push 0x1007b690
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [esp + 0x44]
mov eax, dword [0x1007b6d8]
mov edx, dword [esp + 0x40]
mov ecx, dword [0x1007b6dc]
cmp edx, eax
mov edi, esi
sbb edi, ecx
jl 0x10046081
mov eax, edx
mov ecx, esi
mov dword [0x1007b6d8], edx
mov dword [0x1007b6dc], esi
mov edx, 0x3e8
imul edi, ecx, 0x3e8
mul edx
mov ebx, eax
add edi, edx
push 0x1007b690
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov al, 1
mov dword [esp + 8], 0
mov dword [esp + 0x18], eax
call dword [sym.imp.kernel32.dll_GetTickCount64]
mov esi, eax
mov eax, dword [0x1007a228]
mov ecx, edx
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], ebx
imul ecx, eax
mul esi
imul esi, dword [0x1007a22c]
add edx, ecx
mov dword [esp + 0x2c], eax
add esi, edx
mov dword [esp + 0x10], esi
or esi, edi
mov edi, eax
mov al, byte [esp + 0x3f]
or edi, ebx
mov byte [esp + 0x44], al
mov eax, dword [esp + 0x3b]
mov dword [esp + 0x40], eax
mov eax, dword [0x1007b650]
mov dword [esp + 0xc], eax
mov ecx, dword [0x1007b65c]
mov ebx, dword [0x1007b658]
mov eax, ebx
mov edx, ecx
lock cmpxchg8b qword [0x1007b658]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ebx
xor edx, ecx
xor eax, ebx
or eax, edx
jne 0x100460f9
mov ecx, dword [0x1007b664]
mov ebx, dword [0x1007b660]
mov eax, ebx
mov edx, ecx
lock cmpxchg8b qword [0x1007b660]
xor edx, ecx
xor eax, ebx
or eax, edx
jne 0x10046121
mov eax, edi
mov dword [esp + 0x34], ecx
or eax, esi
mov eax, ebx
sete byte [esp + 5]
cmp dword [esp + 0xc], 0
setne byte [esp + 7]
or eax, dword [esp + 0x20]
or ecx, dword [esp + 0x24]
mov edx, eax
or edx, ecx
sete byte [esp + 6]
cmp byte [0x1007b61c], 0
jne 0x10046239
or eax, edi
mov edi, dword [esp + 0x10]
or ecx, esi
or ecx, eax
je 0x100461cb
cmp dword [esp + 0xc], 0
mov ecx, ebx
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 8]
sete al
sub ecx, dword [esp + 0x2c]
sbb esi, edi
or dl, al
mov edx, dword [esp + 0x30]
jne 0x1004621c
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x24]
sub eax, dword [esp + 0x28]
sbb ecx, edx
cmp byte [0x1007b670], 0
je 0x10046274
xor edx, edx
neg eax
sbb edx, ecx
jl 0x10046241
lea eax, [esp + 0x40]
xor ecx, ecx
mov esi, dword [ebp + 8]
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x30]
mov dword [esi], edx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], edi
mov byte [esi + 0x10], cl
mov cl, byte [esp + 5]
mov byte [esi + 0x11], cl
mov ecx, dword [esp + 0x18]
mov byte [esi + 0x12], cl
mov ecx, dword [eax]
mov al, byte [eax + 4]
mov dword [esi + 0x13], ecx
mov byte [esi + 0x17], al
mov ecx, dword [esp + 0x50]
xor ecx, ebp
call fcn.10069260
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, ecx
mov ecx, esi
jmp 0x100461c3
mov al, 1
mov dword [esp + 0x18], 0
xor ebx, ebx
xor edi, edi
mov dword [esp + 8], eax
jmp 0x100460ab
mov edi, dword [esp + 0x10]
or eax, ecx
je 0x100461cb
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x34]
mov dword [esp + 0x2c], ebx
mov cl, 1
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x30], eax
mov al, byte [esp + 6]
mov byte [esp + 5], al
mov al, byte [esp + 7]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x4b]
jmp 0x100461d1
mov edx, eax
mov edi, esi
mov esi, ecx
sub edx, dword [esp + 0xc]
mov dword [esp + 0x1c], edi
sbb esi, edi
mov edi, esi
sar edi, 0x1f
add edx, edi
adc esi, edi
xor edx, edi
xor esi, edi
mov edi, dword [0x1007b67c]
mov dword [esp + 8], edi
mov edi, dword [0x1007b678]
mov dword [esp + 0x14], edi
cmp edi, edx
mov edi, dword [esp + 8]
sbb edi, esi
jge 0x100463b3
sub edx, dword [esp + 0x14]
mov edi, dword [0x1007b684]
sbb esi, dword [esp + 8]
cmp dword [0x1007b680], edx
sbb edi, esi
mov edi, dword [esp + 0x10]
jge 0x100461c3
mov edx, dword [esp + 0x1c]
mov eax, edx
sar eax, 0x1f
mov esi, eax
mov ecx, eax
add esi, dword [esp + 0xc]
adc ecx, edx
mov dh, byte [0x1007a230]
test dh, 1
je 0x100463ab
xor esi, eax
xor ecx, eax
cmp esi, dword [0x1007b688]
sbb ecx, dword [0x1007b68c]
jge 0x100463ab
call dword [sym.imp.kernel32.dll_GetTickCount64]
mov esi, eax
mov eax, dword [0x1007a228]
mov ecx, edx
imul ecx, eax
mul esi
imul esi, dword [0x1007a22c]
add edx, ecx
mov edi, eax
add esi, edx
push 0x1007b690
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [0x1007b6a8]
mov ecx, dword [0x1007b6ac]
mov dword [esp + 0x14], edi
mov dword [esp + 8], esi
cmp edi, eax
mov edi, dword [0x1007b6b4]
sbb esi, ecx
mov esi, dword [0x1007b6b0]
jae 0x1004638c
mov edx, dword [esp + 0x14]
not edx
add eax, edx
mov edx, dword [esp + 8]
not edx
adc ecx, edx
add eax, esi
adc ecx, edi
push edi
push esi
push ecx
push eax
call fcn.1006a070
cmp eax, 5
mov ecx, edx
sbb edx, 0
jb 0x100463bc
mov byte [0x1007a230], 0
jmp 0x100463a0
add esi, dword [esp + 0x14]
adc edi, dword [esp + 8]
mov dword [0x1007b6a8], esi
mov dword [0x1007b6ac], edi
push 0x1007b690
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
jmp 0x100461c3
add eax, 1
adc ecx, 0
imul edi, eax
mul esi
add edx, edi
imul ecx, esi
add ecx, edx
add eax, dword [esp + 0x14]
adc ecx, dword [esp + 8]
mov dword [0x1007b6a8], eax
mov dword [0x1007b6ac], ecx
jmp 0x100463a0