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

Disassembly:
sub esp, 0xe4
push esi
mov esi, dword [esp + 0xec]
cmp si, 0x28
mov dword [esp + 0xc], 0
jbe 0x40176c
cmp si, 0x64
ja 0x401783
cmp si, 0x3d
jb 0x401783
cmp word [0x40b740], 1
jne 0x40176c
xor eax, eax
pop esi
add esp, 0xe4
ret
push 0x40b0f8
push 0x40b908
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
je 0x40178d
xor eax, eax
pop esi
add esp, 0xe4
ret
push ebx
push ebp
and esi, 0xffff
push edi
push esi
lea eax, [esp + 0x24]
push str.DPU_d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edi, str.SYSTEMCurrentControlSetControlComputerNameActiveComputerName
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x90]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x48]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
rep movsb byte es:[edi], byte [esi]
mov edi, str.ComputerName
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x1c], 0x28
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x90]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x14], 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push edx
push reloc.WSOCK32.dll_bind
call ebp
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4018c4
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x54]
push 0
push eax
push ecx
call ebx
test eax, eax
jne 0x4018c4
lea esi, [esp + 0x68]
lea eax, [esp + 0x20]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401885
test cl, cl
je 0x401881
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401885
add eax, 2
add esi, 2
test cl, cl
jne 0x401861
xor eax, eax
jmp 0x40188a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4018c4
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4018c4
mov dword [esp + 0x18], 1
mov edi, str.SYSTEMCurrentControlSetControlComputerNameComputerName
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x90]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x90]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push edx
push reloc.WSOCK32.dll_bind
call ebp
test eax, eax
jne 0x40199d
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x54]
push 0
push eax
push ecx
call ebx
test eax, eax
jne 0x40199d
lea esi, [esp + 0x68]
lea eax, [esp + 0x20]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x401961
test cl, cl
je 0x40195d
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x401961
add eax, 2
add esi, 2
test cl, cl
jne 0x401939
xor eax, eax
jmp 0x401966
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40199d
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
mov eax, 1
je 0x4019a1
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0xe4
ret