Function at 0x405880
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x470
mov eax, dword [0x487fb0]
xor eax, esp
mov dword [esp + 0x46c], eax
push ebx
xor ebx, ebx
cmp dword [esi], ebx
ja 0x40604a
push ebp
push edi
push 0x206
lea ecx, [esp + 0x6e]
xor eax, eax
push ebx
push ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x30], 1
mov dword [esp + 0x20], ebx
mov word [esp + 0x74], ax
call fcn.00451da0
push 0x206
lea eax, [esp + 0x282]
xor edx, edx
push ebx
push eax
mov word [esp + 0x288], dx
call fcn.00451da0
add esp, 0x18
lea ecx, [esp + 0x10]
push ecx
push 0x20019
xor eax, eax
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionNetworkCards
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x3c], 0x1010101
mov dword [esp + 0x40], 0x1010102
mov byte [esp + 0x48], bl
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov byte [esp + 0x59], al
mov dword [esp + 0x34], ebx
xor edi, edi
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405d5a
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x7c]
push eax
push ebx
push ecx
xor ebp, ebp
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x405d34
nop
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
push 0x20019
push ebx
lea eax, [esp + 0x74]
push eax
inc ebp
push ecx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405d0e
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x14]
push edx
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push str.ServiceName
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405d0e
mov ebp, dword [esp + 0x14]
cmp ebp, ebx
jbe 0x405d0e
xor ecx, ecx
mov eax, ebp
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041005d
mov edi, eax
mov eax, dword [esp + 0x18]
lea ecx, [eax + eax]
push ecx
push ebx
push edi
call fcn.00451da0
mov ecx, dword [esp + 0x1c]
add esp, 0x10
lea edx, [esp + 0x14]
push edx
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push str.ServiceName
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405d0e
push edi
lea edx, [esp + 0x274]
push str.._s
push edx
mov edx, 0x104
call fcn.00401330
add esp, 0xc
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80
lea eax, [esp + 0x288]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x405a78
cmp edi, ebx
je 0x405d0e
push edi
call fcn.0044f44a
add esp, 4
xor edi, edi
jmp 0x405d0e
mov ecx, dword [esi]
add ecx, 0xc2
shl ecx, 4
add ecx, esi
push ecx
push edi
call dword [sym.imp.ole32.dll_CLSIDFromString]
lea edx, [esp + 0x34]
push edx
mov ebx, edi
call fcn.00406420
test edi, edi
je 0x405aa8
push edi
call fcn.0044f44a
add esp, 4
xor edi, edi
movzx eax, byte [esp + 0x39]
movzx ecx, byte [esp + 0x38]
movzx edx, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push ecx
movzx ecx, byte [esp + 0x3d]
push edx
movzx edx, byte [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.00450247
mov eax, dword [esi]
mov edx, dword [esp + 0x68]
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2 + 0x16c]
mov dword [eax], edx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x70]
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x74]
add esp, 0x20
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x58]
push 0
mov byte [eax + 0x10], dl
lea eax, [esp + 0x24]
push eax
push 0x12
lea ecx, [esp + 0x40]
push ecx
push 4
lea edx, [esp + 0x3c]
push edx
push 0x170002
push ebp
call ebx
test eax, eax
je 0x405b94
movzx eax, byte [esp + 0x39]
movzx ecx, byte [esp + 0x38]
movzx edx, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push ecx
movzx ecx, byte [esp + 0x3d]
push edx
movzx edx, byte [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.00450247
mov eax, dword [esi]
mov edx, dword [esp + 0x68]
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2 + 4]
mov dword [eax], edx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x70]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x74]
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x78]
add esp, 0x20
mov byte [eax + 0x10], dl
xor eax, eax
push eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov word [esp + 0x48], ax
lea eax, [esp + 0x24]
push eax
push 0x12
lea ecx, [esp + 0x40]
push ecx
push 4
lea edx, [esp + 0x40]
push edx
push 0x170002
push ebp
call ebx
test eax, eax
je 0x405c2f
movzx eax, byte [esp + 0x39]
movzx ecx, byte [esp + 0x38]
movzx edx, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push ecx
movzx ecx, byte [esp + 0x3d]
push edx
movzx edx, byte [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.00450247
mov eax, dword [esi]
mov edx, dword [esp + 0x68]
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2 + 0xb8]
mov dword [eax], edx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x70]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x74]
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x78]
add esp, 0x20
mov byte [eax + 0x10], dl
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push str.Description
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405cec
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x405cec
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041005d
mov ebx, eax
mov eax, dword [esp + 0x18]
lea ecx, [eax + eax]
push ecx
push 0
push ebx
mov dword [esp + 0x2c], ebx
call fcn.00451da0
mov ecx, dword [esp + 0x1c]
add esp, 0x10
lea edx, [esp + 0x14]
push edx
push ebx
lea eax, [esp + 0x2c]
push eax
push 0
push str.Description
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405cec
mov edx, dword [esi]
shl edx, 8
mov ecx, ebx
lea edx, [edx + esi + 0x220]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x405cc2
test ebx, ebx
je 0x405cec
mov eax, dword [esp + 0x1c]
push eax
call fcn.0044f44a
add esp, 4
mov dword [esp + 0x1c], 0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xc]
inc dword [esi]
test eax, eax
je 0x405d0c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], 0
xor ebx, ebx
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x7c]
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x405970
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x405d47
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x405d5a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], ebx
cmp dword [esi], ebx
ja 0x406030
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push ebx
push str.SYSTEMCurrentControlSetServicesTcpipParametersAdapters
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40600e
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x7c]
push eax
push ebx
push ecx
xor ebp, ebp
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40600e
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x274]
mov edx, 0x104
push str.._s
push ecx
inc ebp
mov dword [esp + 0x24], edx
call fcn.00401330
add esp, 0xc
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80
lea edx, [esp + 0x288]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x405e13
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFile
call fcn.00450325
add esp, 8
jmp 0x405fec
mov eax, dword [esi]
add eax, 0xc2
shl eax, 4
add eax, esi
push eax
lea ecx, [esp + 0x6c]
push ecx
call dword [sym.imp.ole32.dll_CLSIDFromString]
lea edx, [esp + 0x34]
push edx
lea ebx, [esp + 0x6c]
call fcn.00406420
movzx eax, byte [esp + 0x39]
movzx ecx, byte [esp + 0x38]
movzx edx, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push ecx
movzx ecx, byte [esp + 0x3d]
push edx
movzx edx, byte [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.00450247
mov eax, dword [esi]
mov edx, dword [esp + 0x68]
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2 + 0x16c]
mov dword [eax], edx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x70]
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x74]
add esp, 0x20
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x58]
push 0
mov byte [eax + 0x10], dl
lea eax, [esp + 0x24]
push eax
push 0x12
lea ecx, [esp + 0x40]
push ecx
push 4
lea edx, [esp + 0x3c]
push edx
push 0x170002
push edi
call ebx
test eax, eax
je 0x405f25
movzx eax, byte [esp + 0x39]
movzx ecx, byte [esp + 0x38]
movzx edx, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push ecx
movzx ecx, byte [esp + 0x3d]
push edx
movzx edx, byte [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.00450247
mov eax, dword [esi]
mov edx, dword [esp + 0x68]
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2 + 4]
mov dword [eax], edx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x70]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x74]
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x78]
add esp, 0x20
mov byte [eax + 0x10], dl
xor eax, eax
push eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov word [esp + 0x48], ax
lea eax, [esp + 0x24]
push eax
push 0x12
lea ecx, [esp + 0x40]
push ecx
push 4
lea edx, [esp + 0x40]
push edx
push 0x170002
push edi
call ebx
test eax, eax
je 0x405fc0
movzx eax, byte [esp + 0x39]
movzx ecx, byte [esp + 0x38]
movzx edx, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push ecx
movzx ecx, byte [esp + 0x3d]
push edx
movzx edx, byte [esp + 0x40]
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.00450247
mov eax, dword [esi]
mov edx, dword [esp + 0x68]
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2 + 0xb8]
mov dword [eax], edx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x70]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x74]
mov dword [eax + 0xc], ecx
mov dl, byte [esp + 0x78]
add esp, 0x20
mov byte [eax + 0x10], dl
mov eax, dword [esi]
shl eax, 8
lea ecx, [esp + 0x68]
lea edx, [eax + esi + 0x220]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x405fd0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [esi]
xor ebx, ebx
mov eax, dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x7c]
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x405db1
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x406021
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x406030
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esi]
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x46c]
xor ecx, esp
call fcn.0044f3b0
add esp, 0x470
ret
mov ecx, dword [esp + 0x470]
mov eax, dword [esi]
pop ebx
xor ecx, esp
call fcn.0044f3b0
add esp, 0x470
ret