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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43b348
push eax
mov dword fs:[0], esp
sub esp, 0x25c
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
cmp dword [esi + 0x10], 0
je 0x402093
push 0x208
lea eax, [ebp - 0x268]
mov dword [ebp - 0x10], 1
push 0
push eax
call fcn.004213e0
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x401fa5
mov esi, dword [esi]
push esi
push str.___s
lea eax, [ebp - 0x268]
push 0x104
push eax
call fcn.004011b0
add esp, 0x10
lea eax, [ebp + 8]
push eax
push str.systemCurrentControlSetServices
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x401ffc
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x401fe1
mov eax, dword [edi]
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x40201a
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0xbf4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0x268]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402023
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x268]
push eax
push 1
push 0
push str.ImagePath
push dword [ebp + 0xc]
call esi
test eax, eax
je 0x40206b
push dword [ebp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp + 8]
call esi
jmp 0x401ffc
push 4
lea eax, [ebp - 0x10]
push eax
push 4
push 0
push str.Type
push dword [ebp + 0xc]
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
test eax, eax
jne 0x402062
call esi
push dword [ebp + 8]
call esi
push edi
mov edx, 0x48b678
lea ecx, [ebp - 0x60]
call fcn.00402cf0
add esp, 4
mov dword [ebp - 4], 0
lea esi, [ebp - 0x60]
cmp dword [ebp - 0x4c], 8
lea ecx, [ebp - 0x28]
push 0x14
cmovae esi, dword [ebp - 0x60]
push 0x48b6e4
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00402850
mov byte [ebp - 4], 1
call fcn.004011f0
lea ecx, [ebp - 0x28]
push ecx
mov ecx, eax
call fcn.00403120
test eax, eax
je 0x4020f6
push esi
lea ecx, [ebp - 0x48]
push ecx
call eax
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x40212e
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402124
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4021f0
push edx
push ecx
call fcn.0041ee0c
add esp, 8
push 0xc
push str.NtLoadDriver
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.00402850
mov byte [ebp - 4], 2
call fcn.004011f0
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
call fcn.00403120
test eax, eax
je 0x402171
lea ecx, [ebp - 0x48]
push ecx
call eax
mov esi, eax
jmp 0x402176
mov esi, 0xc0000138
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x4021a6
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40219c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4021f0
push edx
push ecx
call fcn.0041ee0c
add esp, 8
mov edx, dword [ebp - 0x4c]
cmp edx, 8
jb 0x4021dc
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4021d2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4021f0
push edx
push ecx
call fcn.0041ee0c
add esp, 8
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret 8
call fcn.00424b90
int3