Function at 0x4064b0
Capabilities:
Create directory
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a8b0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x42500c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], ecx
mov byte [ebp - 0xd], 0
call fcn.004011a0
mov ecx, eax
test ecx, ecx
jne 0x4064f4
push 0x80004005
call fcn.00401520
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], 0
call fcn.004011a0
mov ecx, eax
test ecx, ecx
jne 0x40651b
push 0x80004005
call fcn.00401520
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 1
call fcn.004011a0
mov ecx, eax
test ecx, ecx
jne 0x40653f
push 0x80004005
call fcn.00401520
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 3
call fcn.004062b0
mov byte [ebp - 4], 4
lea ecx, [ebx - 0x10]
mov edx, dword [eax]
mov dword [ebp - 0x2c], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x18], eax
cmp eax, ecx
je 0x4065cc
cmp dword [ecx + 0xc], 0
lea ebx, [ecx + 0xc]
jl 0x4065bd
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x4065bd
mov ecx, dword [ebp - 0x18]
call fcn.004053d0
mov dword [ebp - 0x18], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4065b2
mov edx, dword [ebp - 0x2c]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x18]
add ebx, 0x10
mov dword [ebp - 0x20], ebx
jmp 0x4065cc
push dword [edx - 0xc]
lea ecx, [ebp - 0x20]
push edx
call fcn.004054a0
mov ebx, dword [ebp - 0x20]
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4065eb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebx - 0xc], 0
je 0x4068df
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4068df
lea ecx, [ebp - 0x18]
call fcn.004063a0
mov byte [ebp - 4], 5
lea ecx, [edi - 0x10]
mov edx, dword [eax]
mov dword [ebp - 0x2c], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x30], eax
cmp eax, ecx
je 0x40666f
cmp dword [ecx + 0xc], 0
lea edi, [ecx + 0xc]
jl 0x406660
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x406660
mov ecx, dword [ebp - 0x30]
call fcn.004053d0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x406655
mov edx, dword [ebp - 0x2c]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x30]
add edi, 0x10
mov dword [ebp - 0x14], edi
jmp 0x40666f
push dword [edx - 0xc]
lea ecx, [ebp - 0x14]
push edx
call fcn.004054a0
mov edi, dword [ebp - 0x14]
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40668e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [edi - 0xc], 0
je 0x4068df
mov ecx, edi
call fcn.004075e0
test al, al
je 0x4068df
lea ecx, [ebp - 0x18]
call fcn.00406e70
mov byte [ebp - 4], 6
lea ecx, [esi - 0x10]
mov edx, dword [eax]
mov dword [ebp - 0x2c], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x30], eax
cmp eax, ecx
je 0x406710
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x406701
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x406701
mov ecx, dword [ebp - 0x30]
call fcn.004053d0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x4066f6
mov edx, dword [ebp - 0x2c]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x30]
add esi, 0x10
mov dword [ebp - 0x24], esi
jmp 0x406710
push dword [edx - 0xc]
lea ecx, [ebp - 0x24]
push edx
call fcn.004054a0
mov esi, dword [ebp - 0x24]
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40672f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x14]
mov edx, 0x421694
push eax
lea ecx, [ebp - 0x2c]
call fcn.00404b80
push 0x421694
mov edx, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x30]
call fcn.00404c50
push str.__RegServer
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1c]
call fcn.00404c50
add esp, 0xc
mov byte [ebp - 4], 0xa
or eax, 0xffffffff
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x406788
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4067a7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ecx
mov ecx, esp
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x34], ecx
call fcn.00405350
call fcn.00406d60
add esp, 4
test al, al
je 0x4068c0
lea eax, [ebp - 0x38]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
push 0x421698
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4068c0
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], eax
test esi, esi
jne 0x406811
push 0x80004005
call fcn.00401520
mov ecx, esi
lea eax, [ecx + 2]
mov dword [ebp - 0x34], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406820
sub ecx, dword [ebp - 0x34]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push 0x421724
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x40685a
push 0x80004005
call fcn.00401520
mov ecx, eax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406860
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
mov ecx, dword [ebp - 0x28]
push eax
push ecx
push 1
push 0
push 0x421734
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov edx, dword [ebp - 0x1c]
mov byte [ebp - 0xd], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4068b0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4068df
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4068df
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4068df
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4068fd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x406918
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x406934
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret