Function at 0x4081b0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x448
mov eax, dword [0x42cb90]
xor eax, esp
mov dword [esp + 0x444], eax
mov eax, dword [esp + 0x44c]
push ebx
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [esp + 0x45c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], esi
mov ebx, 0x400
mov dword [esp + 0x14], ebp
je 0x40852e
cmp esi, ebp
je 0x40852e
push edi
push ebx
mov dword [esi], ebp
call fcn.0040f141
mov edi, eax
add esp, 4
test edi, edi
jne 0x408226
lea eax, [ebp - 0xd]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x444]
xor ecx, esp
call fcn.0040f6db
add esp, 0x448
ret
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push str.SOFTWAREKaseyaAgent
push 0x80000002
mov byte [edi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408406
push eax
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x38]
push edx
push 0
push 0
push 0
push eax
mov dword [esp + 0x4c], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x4083fb
xor esi, esi
test eax, eax
mov dword [esp + 0x2c], esi
jbe 0x4083f7
lea esp, [esp]
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x58]
push edx
push esi
push eax
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4083e6
lea ecx, [esp + 0x28]
push ecx
push 0x20019
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x50]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4083e6
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x14c]
push edx
lea eax, [esp + 0x28]
push eax
push 0
push 0x423eb8
push ecx
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4083d7
cmp dword [esp + 0x20], 1
jne 0x4083d7
cmp dword [esp + 0x10], eax
jbe 0x4083d7
push 0x104
lea edx, [esp + 0x250]
push edx
lea eax, [esp + 0x150]
push str.Server_Name
push eax
call fcn.00403ea0
add esp, 0x10
test eax, eax
jle 0x4083d7
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x250]
push edx
call fcn.0041060f
add esp, 8
test eax, eax
jne 0x4083d7
lea eax, [esp + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408380
sub eax, edx
mov esi, eax
lea eax, [esi + ebp + 2]
cmp eax, ebx
jle 0x4083b3
lea ebx, [ebx + esi + 2]
push ebx
push edi
call fcn.0040e8f0
add esp, 8
test eax, eax
je 0x4083b3
mov edi, eax
mov dword [esp + 0x18], 0xfffffff3
jmp 0x4083d7
cmp dword [esp + 0x18], 0
jne 0x4083d7
lea eax, [esp + 0x44]
mov edx, eax
mov ecx, edi
sub ecx, edx
lea edx, [ecx + ebp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4083c7
lea ebp, [esi + ebp + 1]
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x2c]
add esi, 1
cmp esi, dword [esp + 0x1c]
mov dword [esp + 0x2c], esi
jb 0x4082a0
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push str.SystemCurrentControlSetServicesVxDKaseya
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408509
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x14c]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push 0x423eb8
push eax
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4084fe
cmp dword [esp + 0x20], 1
jne 0x4084fe
cmp dword [esp + 0x10], eax
jbe 0x4084fe
push 0x104
lea ecx, [esp + 0x250]
push ecx
lea edx, [esp + 0x150]
push str.Server_Name
push edx
call fcn.00403ea0
add esp, 0x10
test eax, eax
jle 0x4084fe
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x250]
push ecx
call fcn.0041060f
add esp, 8
test eax, eax
jne 0x4084fe
lea edx, [ebp + 8]
cmp edx, ebx
jle 0x4084d6
add ebx, 8
push ebx
push edi
call fcn.0040e8f0
add esp, 8
test eax, eax
je 0x4084d6
mov edi, eax
mov dword [esp + 0x18], 0xfffffff3
jmp 0x4084fe
cmp dword [esp + 0x18], 0
jne 0x4084fe
mov eax, dword [str.Legacy]
mov dword [edi + ebp], eax
mov cx, word [0x423f30]
mov word [edi + ebp + 4], cx
mov dl, byte [0x423f32]
mov byte [edi + ebp + 6], dl
add ebp, 7
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebp, ebp
jle 0x40851c
mov eax, dword [esp + 0x18]
mov byte [edi + ebp], 0
mov dword [esi], edi
jmp 0x40820d
push edi
call fcn.0040e862
mov eax, dword [esp + 0x1c]
add esp, 4
jmp 0x40820d
mov ecx, dword [esp + 0x450]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0xfffffff7
call fcn.0040f6db
add esp, 0x448
ret