Function at 0x10021c30
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10081f98
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x1c], eax
push eax
mov dword [ebp - 4], 0
lea eax, [ebp - 0x10]
push dword [ebp + 8]
xor ebx, ebx
push str.UserInfoFromLocalMachine:_AppID_s__bAvoidAdvapi32_d
push eax
call fcn.1003a800
add esp, 0x10
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x10]
call fcn.100394f0
mov byte [ebp - 4], bl
or edi, 0xffffffff
mov edx, dword [ebp - 0x10]
mov eax, edi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x10021ca9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ecx
mov ecx, esp
push str.CAMEYO_FORCEUSERPROFILE
call fcn.10022bb0
mov edx, 0x104
lea ecx, [ebp - 0x18]
call fcn.1003dc20
add esp, 4
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x18]
cmp dword [ecx - 0xc], 0
je 0x10021db6
mov edx, 0x1008f1e4
mov eax, ecx
mov edi, edi
mov si, word [eax]
cmp si, word [edx]
jne 0x10021d06
test si, si
je 0x10021d02
mov si, word [eax + 2]
cmp si, word [edx + 2]
jne 0x10021d06
add eax, 4
add edx, 4
test si, si
jne 0x10021ce0
xor eax, eax
jmp 0x10021d0b
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x10021db6
mov eax, dword [0x100b2d5c]
lea edx, [ecx - 0x10]
lea esi, [eax - 0x10]
cmp edx, esi
je 0x10021d73
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x10021d60
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x10021d60
mov ecx, edx
call fcn.100236e0
mov dword [ebp - 0x14], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x10021d56
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [0x100b2d5c], eax
jmp 0x10021d73
push dword [ecx - 0xc]
push ecx
mov ecx, 0x100b2d5c
call fcn.10023530
mov eax, dword [0x100b2d5c]
push eax
lea eax, [ebp - 0x10]
push 0x1008f1e8
push eax
call fcn.1003a800
add esp, 0xc
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x10]
call fcn.100394f0
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10021db1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, 1
cmp dword [ebp - 0x1c], 0
je 0x10021dd9
push ecx
mov ecx, dword [ebp + 8]
mov esi, esp
add ecx, 0xfffffff0
call fcn.100236e0
add eax, 0x10
mov dword [esi], eax
call fcn.10021880
add esp, 4
jmp 0x10021de6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call fcn.10039ea0
test eax, eax
je 0x10021f73
push 1
push 0
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str.UserId
call fcn.10022bb0
push ecx
mov eax, esp
mov byte [ebp - 4], 4
push dword [ebp + 8]
push str.SoftwareCameyoUserInfo_s
push eax
call fcn.1003a800
add esp, 0xc
mov byte [ebp - 4], 2
mov edx, 0x100b2d58
mov ecx, SysReAllocStringLen
call fcn.1003b0d0
add esp, 0x14
test eax, eax
je 0x10021f2a
push 1
push 0
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str.UserProfile
call fcn.10022bb0
push ecx
mov eax, esp
mov byte [ebp - 4], 5
push dword [ebp + 8]
push str.SoftwareCameyoUserInfo_s
push eax
call fcn.1003a800
add esp, 0xc
mov byte [ebp - 4], 2
mov edx, 0x100b2d5c
mov ecx, SysReAllocStringLen
call fcn.1003b0d0
add esp, 0x14
test eax, eax
je 0x10021f2a
push str._none_
lea ecx, [ebp - 0x10]
call fcn.10022bb0
push 0
push 0
push 0
push ecx
mov byte [ebp - 4], 7
lea esi, [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str.AppData
call fcn.10022bb0
push ecx
mov ecx, esp
mov byte [ebp - 4], 8
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
mov edx, 0x100b2d58
call fcn.10022e60
add esp, 4
mov byte [ebp - 4], 7
mov edx, esi
mov ecx, SysReAllocStringLen
call fcn.1003b0d0
add esp, 0x10
mov eax, esp
push dword [ebp - 0x10]
push dword [0x100b2d5c]
push dword [0x100b2d58]
push str.___UserInfoFromLocalMachine:_UserID_s__UserProfile_s._RegTest:__s
push eax
call fcn.1003a800
add esp, 0x14
call fcn.10021810
mov byte [ebp - 4], 2
add esp, 4
mov edx, dword [ebp - 0x10]
mov ebx, 1
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10021f73
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10021f73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push str.UserInfoFromLocalMachine:_failed_reading_UserId___UserProfile___s__from_registry__LE_d
push eax
call fcn.1003a800
add esp, 0x10
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x14]
call fcn.100394f0
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10021f71
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor ebx, ebx
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10021f93
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x10021fb4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret