Function at 0x42b0d0
Capabilities:
Encode data using xor
Encrypt data using dpapi
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [eax], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
mov dword [ecx], 0
test esi, esi
je 0x42b49e
cmp word [esi], 0
je 0x42b49e
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x20019
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
je 0x42b128
mov eax, 0xfffffff6
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push str.softwareFortinetFortiClientFA_DPSTORE
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x42b158
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xfffffff4
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], 0
push eax
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0
push eax
push 0
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x42b482
cmp dword [ebp - 0x18], 1
jne 0x42b482
mov eax, dword [ebp - 0x14]
push edi
add eax, 8
push 1
push eax
call dword [0x4c5964]
mov edi, eax
add esp, 8
test edi, edi
jne 0x42b1c2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [edi - 0x10]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x18]
push eax
push 0
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x42b20b
push edi
call dword [0x4c5958]
add esp, 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 0xffffffef
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x42b222
sub esi, ecx
sar esi, 1
mov eax, esi
shr eax, 1
add eax, 8
push ebx
mov dword [ebp - 0x1c], eax
add eax, 8
push 1
push eax
call dword [0x4c5964]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x42b265
push edi
call dword [0x4c5958]
add esp, 4
lea eax, [ebx - 0x14]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [esi + 1]
shr eax, 1
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push ebx
push esi
push edi
call fcn.004a7f2a
push edi
mov esi, eax
call dword [0x4c5958]
add esp, 0x14
test esi, esi
je 0x42b29f
push ebx
call dword [0x4c5958]
add esp, 4
mov eax, 0xffffffe7
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
xorps xmm0, xmm0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x38], ebx
push eax
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x30], 0x4ccc20
push eax
mov dword [ebp - 0x34], 0x40
movlpd qword [ebp - 0x10], xmm0
call sub.CRYPT32.dll_CryptUnprotectData
push ebx
mov esi, eax
call dword [0x4c5958]
add esp, 4
test esi, esi
jne 0x42b2fa
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
pop edi
lea eax, [esi - 0x1e]
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xc]
mov edx, esi
mov ecx, dword [ebp - 0x10]
lea eax, [edx + ecx]
cmp edx, eax
jae 0x42b332
nop dword [eax]
mov cl, byte [edx]
mov eax, edx
sub eax, esi
rol cl, 4
and eax, 0x3f
xor cl, byte [eax + 0x4ccca0]
mov byte [edx], cl
inc edx
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
lea eax, [esi + ecx]
cmp edx, eax
jb 0x42b310
lea eax, [ecx + 0x24]
mov dword [ebp - 0x24], eax
add eax, 8
push 1
push eax
call dword [0x4c5964]
mov esi, eax
add esp, 8
test esi, esi
jne 0x42b360
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
pop edi
lea eax, [esi - 0x28]
pop esi
mov esp, ebp
pop ebp
ret
movups xmm1, xmmword [0x50d250]
push 0x50d250
movups xmm0, xmmword [0x4ccc60]
lea eax, [ebp - 0x24]
push eax
pxor xmm1, xmm0
movups xmm0, xmmword [0x50d260]
push esi
push dword [ebp - 0x10]
movups xmmword [0x50d250], xmm1
movups xmm1, xmmword [0x4ccc70]
push dword [ebp - 0xc]
pxor xmm1, xmm0
movups xmm0, xmmword [0x50d270]
movups xmmword [0x50d260], xmm1
movups xmm1, xmmword [0x4ccc80]
pxor xmm1, xmm0
movups xmm0, xmmword [0x50d280]
movups xmmword [0x50d270], xmm1
movups xmm1, xmmword [0x4ccc90]
pxor xmm1, xmm0
movups xmmword [0x50d280], xmm1
call fcn.004a7f48
movups xmm1, xmmword [0x50d250]
add esp, 0x14
movups xmm0, xmmword [0x4ccc60]
pxor xmm1, xmm0
movups xmm0, xmmword [0x50d260]
movups xmmword [0x50d250], xmm1
movups xmm1, xmmword [0x4ccc70]
pxor xmm1, xmm0
movups xmm0, xmmword [0x50d270]
movups xmmword [0x50d260], xmm1
movups xmm1, xmmword [0x4ccc80]
pxor xmm1, xmm0
movups xmm0, xmmword [0x50d280]
movups xmmword [0x50d270], xmm1
movups xmm1, xmmword [0x4ccc90]
pxor xmm1, xmm0
movups xmmword [0x50d280], xmm1
test eax, eax
je 0x42b463
push esi
call dword [0x4c5958]
add esp, 4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
pop edi
mov eax, 0xffffffd3
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
pop ebx
pop edi
mov dword [eax], esi
mov eax, dword [ebp - 0x24]
mov dword [ecx], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xfffffff1
pop esi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret