Function at 0x401f10
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x22c
mov eax, dword [0x411020]
xor eax, esp
mov dword [esp + 0x228], eax
mov eax, dword [esp + 0x230]
push ebx
mov dword [esp + 0x18], ecx
mov ecx, dword [0x40fb98]
mov ebx, edx
mov edx, dword [str.EnumRoot_]
push ebp
mov dword [esp + 0x2c], ecx
mov cl, byte [0x40fb9e]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x23c]
mov dword [esp + 0x28], edx
mov dx, word [0x40fb9c]
push esi
mov byte [esp + 0x36], cl
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], eax
mov word [esp + 0x38], dx
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x401f74
lea edi, [esp + 0x30]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401f88
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x34]
push eax
and ecx, 3
push 0x80000002
rep movsb byte es:[edi], byte [esi]
call ebp
test eax, eax
je 0x401fc9
mov dword [ebx + 8], 0x206
xor eax, eax
jmp 0x402398
xor esi, esi
push esi
lea ecx, [esp + 0x34]
push 0x40fba0
push ecx
call fcn.004036ae
mov ecx, dword [esp + 0x24]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call ebx
test eax, eax
jne 0x402039
lea esp, [esp]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 1
movzx eax, si
push eax
lea ecx, [esp + 0x34]
push 0x40fba0
push ecx
call fcn.004036ae
mov ecx, dword [esp + 0x24]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call ebx
test eax, eax
je 0x402000
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call ebp
test eax, eax
je 0x402060
mov edx, dword [esp + 0x14]
mov dword [edx + 8], 0x206
xor eax, eax
jmp 0x402398
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea ecx, [esp + 0x30]
push ecx
push 4
push 0
push str.ConfigFlags
push edx
mov dword [esp + 0x44], 0
call esi
test eax, eax
je 0x4020a6
mov eax, dword [esp + 0x14]
mov dword [eax + 8], 0x205
xor eax, eax
jmp 0x402398
mov ecx, dword [esp + 0x10]
push 0
push 0
push 3
push 0
push str.Capabilities
push ecx
call esi
test eax, eax
je 0x4020d0
mov edx, dword [esp + 0x14]
mov dword [edx + 8], 0x205
xor eax, eax
jmp 0x402398
mov eax, dword [esp + 0x1c]
mov ecx, 0xa
mov esi, str.SystemCurrentControlSetServicesClass_
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4020e7
lea edi, [esp + 0x30]
sub eax, edx
add edi, 0xffffffff
lea esp, [esp]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x402100
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call ebp
test eax, eax
jne 0x40204e
xor esi, esi
push esi
lea eax, [esp + 0x34]
push 0x40fba0
push eax
call fcn.004036ae
mov eax, dword [esp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
call ebx
test eax, eax
jne 0x402199
lea ecx, [ecx]
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 1
movzx edx, si
push edx
lea eax, [esp + 0x34]
push 0x40fba0
push eax
call fcn.004036ae
mov eax, dword [esp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
call ebx
test eax, eax
je 0x402160
mov ebx, dword [esp + 0x1c]
lea edx, [esp + 0x134]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4021a8
lea edi, [esp + 0x134]
add edi, 0xffffffff
mov edi, edi
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4021c0
mov cx, word [0x40fb14]
lea eax, [esp + 0x30]
mov word [edi], cx
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4021e0
lea edi, [esp + 0x134]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4021f5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 1
lea edx, [esp + 0x138]
push edx
push 1
mov ecx, eax
mov eax, dword [esp + 0x1c]
push 0
and ecx, 3
push str.Driver
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
call esi
test eax, eax
je 0x402245
mov ecx, dword [esp + 0x14]
mov dword [ecx + 8], 0x205
xor eax, eax
jmp 0x402398
push 0x104
lea edx, [esp + 0x138]
push 0
push edx
call fcn.00407b20
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 1
lea eax, [esp + 0x138]
push eax
push 1
push 0
push 0x40fbf8
push ecx
call esi
test eax, eax
jne 0x4020be
mov ecx, dword [esp + 0x10]
push 1
lea eax, [esp + 0x138]
push eax
push 1
push 0
push str.DeviceDesc
push ecx
call esi
test eax, eax
jne 0x4020be
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4022a5
sub eax, edx
add eax, 1
push eax
mov eax, dword [esp + 0x14]
push ebx
push 1
push 0
push str.Class
push eax
call esi
test eax, eax
jne 0x402233
mov eax, dword [esp + 0x24]
movzx edx, byte [eax + 0xf]
movzx ecx, byte [eax + 0xe]
push edx
movzx edx, byte [eax + 0xd]
push ecx
movzx ecx, byte [eax + 0xc]
push edx
movzx edx, byte [eax + 0xb]
push ecx
movzx ecx, byte [eax + 0xa]
push edx
movzx edx, byte [eax + 9]
push ecx
movzx ecx, byte [eax + 8]
push edx
movzx edx, word [eax + 6]
push ecx
movzx ecx, word [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x160]
push str._08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
push eax
call fcn.004036ae
lea eax, [esp + 0x168]
add esp, 0x34
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402325
sub eax, edx
mov edx, dword [esp + 0x10]
add eax, 1
push eax
lea ecx, [esp + 0x138]
push ecx
push 1
push 0
push str.ClassGUID
push edx
call esi
test eax, eax
jne 0x402094
mov edi, dword [esp + 0x28]
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402360
mov ecx, dword [esp + 0x10]
sub eax, edx
add eax, 1
push eax
push edi
push 1
push 0
push str.HardwareID
push ecx
call esi
test eax, eax
jne 0x4020be
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov ecx, dword [esp + 0x238]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004031ea
add esp, 0x22c
ret 8