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

Disassembly:
sub esp, 0x448
mov eax, dword [0x435e80]
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 0x40bc0e
cmp esi, ebp
je 0x40bc0e
push edi
push ebx
mov dword [esi], ebp
call fcn.00412f17
mov edi, eax
add esp, 4
test edi, edi
jne 0x40b906
lea eax, [ebp - 0xd]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x444]
xor ecx, esp
call fcn.00412a21
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 0x40bae6
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 0x40badb
xor esi, esi
test eax, eax
mov dword [esp + 0x2c], esi
jbe 0x40bad7
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 0x40bac6
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 0x40bac6
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 0x42b068
push ecx
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40bab7
cmp dword [esp + 0x20], 1
jne 0x40bab7
cmp dword [esp + 0x10], eax
jbe 0x40bab7
push 0x104
lea edx, [esp + 0x250]
push edx
lea eax, [esp + 0x150]
push str.Server_Name
push eax
call fcn.004073d0
add esp, 0x10
test eax, eax
jle 0x40bab7
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x250]
push edx
call fcn.00413d2f
add esp, 8
test eax, eax
jne 0x40bab7
lea eax, [esp + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ba60
sub eax, edx
mov esi, eax
lea eax, [esi + ebp + 2]
cmp eax, ebx
jle 0x40ba93
lea ebx, [ebx + esi + 2]
push ebx
push edi
call fcn.004122f0
add esp, 8
test eax, eax
je 0x40ba93
mov edi, eax
mov dword [esp + 0x18], 0xfffffff3
jmp 0x40bab7
cmp dword [esp + 0x18], 0
jne 0x40bab7
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 0x40baa7
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 0x40b980
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 0x40bbe9
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 0x42b068
push eax
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40bbde
cmp dword [esp + 0x20], 1
jne 0x40bbde
cmp dword [esp + 0x10], eax
jbe 0x40bbde
push 0x104
lea ecx, [esp + 0x250]
push ecx
lea edx, [esp + 0x150]
push str.Server_Name
push edx
call fcn.004073d0
add esp, 0x10
test eax, eax
jle 0x40bbde
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x250]
push ecx
call fcn.00413d2f
add esp, 8
test eax, eax
jne 0x40bbde
lea edx, [ebp + 8]
cmp edx, ebx
jle 0x40bbb6
add ebx, 8
push ebx
push edi
call fcn.004122f0
add esp, 8
test eax, eax
je 0x40bbb6
mov edi, eax
mov dword [esp + 0x18], 0xfffffff3
jmp 0x40bbde
cmp dword [esp + 0x18], 0
jne 0x40bbde
mov eax, dword [str.Legacy]
mov dword [edi + ebp], eax
mov cx, word [0x42b0e0]
mov word [edi + ebp + 4], cx
mov dl, byte [0x42b0e2]
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 0x40bbfc
mov eax, dword [esp + 0x18]
mov byte [edi + ebp], 0
mov dword [esi], edi
jmp 0x40b8ed
push edi
call fcn.00412262
mov eax, dword [esp + 0x1c]
add esp, 4
jmp 0x40b8ed
mov ecx, dword [esp + 0x450]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0xfffffff7
call fcn.00412a21
add esp, 0x448
ret