Function at 0x4059a0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x405dce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x41c
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x29]
mov byte [esp + 0x28], bl
mov byte [esp + 0x22c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x22d]
mov byte [esp + 0x32c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x32d]
xor ebp, ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x22c]
mov ecx, 0x407088
push eax
push 0x1f6
call sub.LDSERV.dll_Ordinal_374
test eax, eax
je 0x405a55
lea ecx, [esp + 0x28]
push ecx
push 0x1f8
mov ecx, 0x407088
call sub.LDSERV.dll_Ordinal_374
test eax, eax
je 0x405a55
lea edx, [esp + 0x32c]
mov ecx, 0x407088
push edx
push 0x1f7
call sub.LDSERV.dll_Ordinal_374
lea eax, [esp + 0x18]
lea ecx, [esp + 0x22c]
push eax
push 0xf003f
push ebx
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405c12
lea edx, [esp + 0x20]
lea eax, [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ebx
lea ecx, [esp + 0x34]
push ebx
push ecx
push edx
mov dword [esp + 0x38], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405c0d
push 0x146c
call sub.LDSERV.dll_Ordinal_51
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, ebx
mov dword [esp + 0x434], ebx
je 0x405ace
mov ecx, eax
call fcn.00401090
mov esi, eax
jmp 0x405ad0
xor esi, esi
cmp esi, ebx
mov dword [esp + 0x434], 0xffffffff
je 0x405c12
lea eax, [esp + 0x10]
mov ecx, 0x4078a8
push eax
mov byte [esp + 0x14], bl
mov word [esp + 0x15], bx
call sub.LDSERV.dll_Ordinal_266
lea ecx, [esp + 0x10]
push ecx
push 0x407088
mov ecx, esi
call fcn.00401a90
test eax, eax
je 0x405bfc
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x405bec
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x129]
mov byte [esp + 0x128], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x128]
mov ecx, esi
push edx
stosb byte es:[edi], al
call fcn.004018c0
test eax, eax
je 0x405bfc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
push 0x20006
push ebx
push 0x40790c
lea edx, [esp + 0x344]
push ebx
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x405bfc
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
inc eax
lea ecx, [esp + 0x128]
push eax
mov eax, dword [esp + 0x20]
push ecx
push 1
lea edx, [esp + 0x1c]
push ebx
push edx
push eax
call edi
test eax, eax
jne 0x405bd0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push 4
push ecx
push 4
lea edx, [esp + 0x34]
push ebx
push edx
push eax
mov ebp, 1
mov dword [esp + 0x2c], ebx
call edi
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, esi
call fcn.00401b90
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
jmp 0x405c12
cmp eax, ebx
jne 0x405bfc
mov ecx, esi
call fcn.00404f60
mov ebp, 1
mov ecx, esi
call fcn.00401b90
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
jmp 0x405c12
mov ebp, 1
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x42c]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x428
ret