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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44c
mov eax, dword [0x44e824]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x438], ecx
and dword [ebp - 0x420], esi
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x424], esi
push edi
mov edi, 0x400
test ecx, ecx
je 0x40b095
test eax, eax
je 0x40b095
and dword [eax], esi
push edi
call fcn.004188c5
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x40ad5d
push 0xfffffffffffffff3
jmp 0x40b097
lea eax, [ebp - 0x41c]
mov byte [ebx], 0
push eax
push 0x20019
push 0
push str.SOFTWAREKaseyaAgent
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40af74
xor ecx, ecx
lea eax, [ebp - 0x440]
push ecx
push ecx
push eax
lea eax, [ebp - 0x444]
mov dword [ebp - 0x428], ecx
push eax
lea eax, [ebp - 0x448]
push eax
push ecx
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x428]
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [ebp - 0x428]
test eax, eax
je 0x40af68
xor ecx, ecx
mov dword [ebp - 0x434], ecx
test eax, eax
je 0x40af68
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], 0x104
push eax
lea eax, [ebp - 0x108]
push eax
push ecx
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x40af49
lea eax, [ebp - 0x430]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40af49
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x42c]
push eax
push 0
push 0x4396ac
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40af3d
cmp dword [ebp - 0x42c], 1
jne 0x40af3d
cmp dword [ebp - 0x418], eax
jbe 0x40af3d
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push str.Server_Name
push eax
call fcn.00405bfb
add esp, 0x10
test eax, eax
jle 0x40af3d
push dword [ebp - 0x438]
lea eax, [ebp - 0x414]
push eax
call fcn.0041bb48
pop ecx
pop ecx
test eax, eax
jne 0x40af3d
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40aedb
sub ecx, edx
lea eax, [ecx + esi]
mov dword [ebp - 0x424], eax
add eax, 2
cmp eax, edi
jle 0x40af13
add ecx, 2
add edi, ecx
push edi
push ebx
call fcn.004188d0
pop ecx
pop ecx
test eax, eax
je 0x40af13
push 0xfffffffffffffff3
mov ebx, eax
pop eax
mov dword [ebp - 0x420], eax
jmp 0x40af19
mov eax, dword [ebp - 0x420]
test eax, eax
jne 0x40af3d
lea ecx, [ebp - 0x108]
mov eax, ebx
mov edx, ecx
sub eax, edx
lea edx, [eax + esi]
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x40af2c
mov esi, dword [ebp - 0x424]
inc esi
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x434]
inc ecx
mov dword [ebp - 0x434], ecx
cmp ecx, dword [ebp - 0x428]
jb 0x40ade1
mov dword [ebp - 0x424], esi
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x41c]
push eax
push 0x20019
push 0
push str.SystemCurrentControlSetServicesVxDKaseya
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b074
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x42c]
push eax
push 0
push 0x4396ac
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40b068
cmp dword [ebp - 0x42c], 1
jne 0x40b068
cmp dword [ebp - 0x418], eax
jbe 0x40b068
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push str.Server_Name
push eax
call fcn.00405bfb
add esp, 0x10
test eax, eax
jle 0x40b068
push dword [ebp - 0x438]
lea eax, [ebp - 0x414]
push eax
call fcn.0041bb48
pop ecx
pop ecx
test eax, eax
jne 0x40b068
lea eax, [esi + 8]
cmp eax, edi
jle 0x40b049
lea eax, [edi + 8]
push eax
push ebx
call fcn.004188d0
pop ecx
pop ecx
test eax, eax
je 0x40b049
push 0xfffffffffffffff3
mov ebx, eax
pop eax
mov dword [ebp - 0x420], eax
jmp 0x40b04f
mov eax, dword [ebp - 0x420]
test eax, eax
jne 0x40b068
lea edi, [ebx + esi]
mov esi, str.Legacy
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x424]
add esi, 7
push dword [ebp - 0x41c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jle 0x40b086
mov eax, dword [ebp - 0x43c]
mov byte [ebx + esi], 0
mov dword [eax], ebx
jmp 0x40b08d
push ebx
call fcn.004188c0
pop ecx
mov eax, dword [ebp - 0x420]
jmp 0x40b098
push 0xfffffffffffffff7
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412e47
mov esp, ebp
pop ebp
ret