Function at 0x40d4e0
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x118], ecx
push edi
push 1
lea ecx, [ebp - 0x10c]
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x128], eax
call fcn.0040d2f0
push 1
lea eax, [ebp - 0x110]
lea ebx, [ebp - 0x114]
call fcn.0040d3d0
add esp, 0xc
test al, al
je 0x40d8c5
push esi
mov esi, dword [ebp - 0x110]
shr esi, 2
cmp byte [ebp + 8], 0
je 0x40d616
mov ecx, dword [ebp - 0x10c]
mov edi, dword [ebp - 0x114]
test ecx, ecx
je 0x40d608
mov eax, 1
cmp esi, eax
jbe 0x40d5a2
cmp dword [edi + eax*4], ecx
je 0x40d583
inc eax
cmp eax, esi
jb 0x40d577
jmp 0x40d5a2
cmp eax, 0xffffffff
je 0x40d5a2
lea ecx, [edi + eax*4]
sub esi, eax
lea eax, [esi*4 - 4]
push eax
lea edx, [ecx + 4]
push edx
push ecx
call fcn.0041f3e0
add esp, 0xc
sub dword [ebp - 0x110], 4
lea eax, [ebp - 0x118]
push eax
push 3
push 0
push str.SYSTEMCurrentControlSetControlGroupOrderList
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d608
mov eax, dword [ebp - 0x110]
cmp eax, 4
jbe 0x40d5d9
shr eax, 2
dec eax
jmp 0x40d5db
xor eax, eax
mov dword [edi], eax
mov ecx, dword [ebp - 0x110]
mov edx, dword [ebp - 0x118]
push ecx
push edi
push 3
push 0
push str.PNP_TDI
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x118]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x40d8c4
push edi
jmp 0x40d8bc
mov edx, dword [ebp - 0x10c]
test edx, edx
jne 0x40d66c
lea eax, [edx + 1]
cmp esi, eax
jbe 0x40d64d
jmp 0x40d630
mov ebx, dword [ebp - 0x114]
mov ecx, dword [ebx + eax*4]
cmp ecx, edx
jb 0x40d646
lea edx, [ecx + 1]
mov dword [ebp - 0x10c], edx
inc eax
cmp eax, esi
jb 0x40d630
jmp 0x40d653
mov ebx, dword [ebp - 0x114]
push edi
push 0
lea ecx, [ebp - 0x10c]
call fcn.0040d2f0
mov edx, dword [ebp - 0x10c]
add esp, 8
jmp 0x40d672
mov ebx, dword [ebp - 0x114]
mov eax, 1
cmp esi, eax
jbe 0x40d692
jmp 0x40d680
cmp dword [ebx + eax*4], edx
je 0x40d68c
inc eax
cmp eax, esi
jb 0x40d680
jmp 0x40d692
mov dword [ebp - 0x120], eax
push 0x43d394
push str.SYSTEMCurrentControlSetServices_s
lea ecx, [ebp - 0x108]
push 0x104
push ecx
call fcn.00420fc4
add esp, 0x10
lea edx, [ebp - 0x11c]
push edx
push 3
push 0
lea eax, [ebp - 0x108]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40d724
lea ecx, [ebp - 0x124]
push ecx
mov ecx, dword [ebp - 0x11c]
lea edx, [ebp - 0x128]
push edx
lea eax, [ebp - 0x12c]
push eax
push 0
push 0x43d360
push ecx
mov dword [ebp - 0x124], 4
call edi
mov edx, dword [ebp - 0x11c]
push edx
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov ebx, dword [ebp - 0x114]
sete al
test al, al
jne 0x40d79f
push str.Tcpip
push str.SYSTEMCurrentControlSetServices_s
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00420fc4
add esp, 0x10
lea ecx, [ebp - 0x11c]
push ecx
push 3
push 0
lea edx, [ebp - 0x108]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d79f
lea eax, [ebp - 0x124]
push eax
mov eax, dword [ebp - 0x11c]
lea ecx, [ebp - 0x128]
push ecx
lea edx, [ebp - 0x12c]
push edx
push 0
push 0x43d360
push eax
mov dword [ebp - 0x124], 4
call edi
mov ecx, dword [ebp - 0x11c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x128]
test ecx, ecx
je 0x40d7bc
mov eax, 1
cmp esi, eax
jbe 0x40d7bc
cmp dword [ebx + eax*4], ecx
je 0x40d80d
inc eax
cmp eax, esi
jb 0x40d7b2
mov ecx, dword [ebp - 0x118]
mov eax, dword [ebp - 0x120]
cmp eax, 0xffffffff
je 0x40d811
cmp ecx, 0xffffffff
je 0x40d858
cmp ecx, eax
jae 0x40d8b7
sub eax, ecx
cmp eax, 1
jbe 0x40d8b7
lea edx, [eax*4 - 4]
push edx
lea esi, [ebx + ecx*4 + 4]
lea eax, [ebx + ecx*4 + 8]
push esi
push eax
call fcn.0041f3e0
mov ecx, dword [ebp - 0x10c]
add esp, 0xc
mov dword [esi], ecx
jmp 0x40d858
mov ecx, eax
jmp 0x40d7c2
cmp ecx, 0xffffffff
je 0x40d848
mov eax, dword [ebp - 0x114]
sub esi, ecx
lea edx, [esi*4 - 4]
lea ebx, [ebx + ecx*4 + 4]
push edx
lea ecx, [eax + ecx*4 + 8]
push ebx
push ecx
call fcn.0041f3e0
mov edx, dword [ebp - 0x10c]
mov dword [ebx], edx
mov ebx, dword [ebp - 0x114]
add esp, 0xc
jmp 0x40d851
mov eax, dword [ebp - 0x10c]
mov dword [ebx + esi*4], eax
add dword [ebp - 0x110], 4
lea ecx, [ebp - 0x120]
push ecx
push 3
push 0
push str.SYSTEMCurrentControlSetControlGroupOrderList
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d8b7
mov eax, dword [ebp - 0x110]
cmp eax, 4
jbe 0x40d888
shr eax, 2
dec eax
jmp 0x40d88a
xor eax, eax
mov dword [ebx], eax
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp - 0x120]
push edx
push ebx
push 3
push 0
push str.PNP_TDI
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x120]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x40d8c4
push ebx
call fcn.0041f741
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0041f152
mov esp, ebp
pop ebp
ret