Function at 0x40ccc0
Capabilities:
Check os version
Create process on windows
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x4450a6
mov eax, dword fs:[0]
push eax
sub esp, 0x184
mov eax, dword [0x4521d0]
xor eax, esp
mov dword [esp + 0x180], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4521d0]
xor eax, esp
push eax
lea eax, [esp + 0x198]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1a8]
mov edi, dword [esp + 0x1ac]
xor ebp, ebp
cmp esi, ebp
jne 0x40cd16
xor eax, eax
jmp 0x40cff4
mov eax, dword [0x45392c]
mov edx, dword [eax + 0xc]
mov ecx, 0x45392c
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
push edi
push esi
lea eax, [esp + 0x24]
push str.__s___s
push eax
mov dword [esp + 0x1b0], ebp
call fcn.00407a50
push 0x110
lea ecx, [esp + 0x98]
push ebp
push ecx
call fcn.0041d8e0
add esp, 0x1c
lea edx, [esp + 0x80]
push edx
mov dword [esp + 0x84], 0x114
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40cd88
cmp dword [esp + 0x84], 6
jne 0x40cd88
mov edi, 1
xor esi, esi
cmp edi, ebp
mov dword [esp + 0x14], ebp
jne 0x40cd9e
lea eax, [esp + 0x14]
push eax
call fcn.0040e820
jmp 0x40cda8
lea ecx, [esp + 0x14]
push ecx
call fcn.0040e7b0
add esp, 4
cmp eax, ebp
jne 0x40cfb8
push 0x40
lea edx, [esp + 0x44]
push ebp
push edx
mov dword [esp + 0x48], 0x44
call fcn.0041d8e0
mov ecx, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x1bc]
neg eax
sbb eax, eax
and eax, 5
push ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x78], 1
mov word [esp + 0x7c], ax
call fcn.0040e8e0
add esp, 0x10
test al, al
jne 0x40ce13
lea edx, [esp + 0x14]
push edx
call fcn.0040eb70
add esp, 4
push str.userenv.dll
mov dword [esp + 0x48], str.Winsta0Default
mov ebx, 0x30
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esp + 0x28], eax
je 0x40ce82
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x448638
push eax
call esi
mov edi, eax
mov eax, dword [esp + 0x28]
push str.DestroyEnvironmentBlock
push eax
call esi
test edi, edi
mov dword [esp + 0x20], eax
je 0x40ce89
mov ecx, dword [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x20]
push edx
call edi
test eax, eax
je 0x40cfab
mov ebx, 0x430
jmp 0x40ce90
push str.CreateProcessAsActivedUserOrSystem__3
call ebp
push str.CreateProcessAsActivedUserOrSystem__4
call ebp
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x40]
push ecx
push 0
push edx
push ebx
mov ebx, dword [esp + 0x30]
push 0
push 0
push 0
push ebx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov esi, eax
test esi, esi
jne 0x40cf54
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x45392c]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x45392c
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
push esi
push edi
lea ecx, [esp + 0x2c]
push str.last_error___d_result___d
push ecx
mov byte [esp + 0x1b0], 1
call fcn.00407a50
mov edi, dword [esp + 0x34]
add esp, 0x10
push edi
call ebp
push str.CreateProcessAsActivedUserOrSystem__error
call ebp
push esi
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x44]
push eax
push 1
push ebx
call fcn.0040c700
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x40cf30
push str.CreateProcess__error
call ebp
lea eax, [edi - 0x10]
mov byte [esp + 0x1a0], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf54
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1b4], 0
je 0x40cf6b
mov ecx, dword [esp + 0x30]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40cf7a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40cf89
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40cf98
mov edx, dword [esp + 0x18]
push edx
call eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40cfa7
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor ebp, ebp
jmp 0x40cfbc
mov dword [esp + 0x18], 0
jmp 0x40ce90
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x40cfcb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebx - 0x10]
mov dword [esp + 0x1a0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cff2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x198]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x180]
xor ecx, esp
call fcn.0041d8d0
add esp, 0x190
ret