Function at 0x4076a0
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Create thread
Print debug messages
Query environment variable
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 0x6000000
je 0x4076b9
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
add esi, 0x58
test byte [esi], 8
jne 0x4076b2
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
mov dword [esi + 0x64], 1
call edi
push 0xfffffffffffffff5
mov dword [esi + 0x44], eax
call edi
push 0xfffffffffffffff4
mov dword [esi + 0x48], eax
call edi
mov dword [esi + 0x4c], eax
mov eax, esi
call fcn.00406fc0
xor ebx, ebx
test eax, eax
je 0x4078a5
cmp dword [esi + 0x64], ebx
je 0x407719
mov eax, dword [esi + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_SetStdHandle]
push eax
push 0xfffffffffffffff6
call edi
mov ecx, dword [esi + 0x30]
push ecx
push 0xfffffffffffffff5
call edi
mov edx, dword [esi + 0x34]
push edx
push 0xfffffffffffffff4
call edi
lea eax, [ebp - 0x4c]
push 0x44
push eax
call fcn.004053d0
mov eax, dword [esi + 0x34]
mov edx, dword [esi + 0x30]
xor ecx, ecx
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x28]
mov word [ebp - 0x1c], cx
mov ecx, dword [esi + 0x2c]
add esp, 8
mov dword [ebp - 0x4c], 0x44
mov dword [ebp - 0x20], 0x101
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
cmp eax, ebx
je 0x40775b
push eax
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov ecx, dword [esi + 0x5c]
mov dword [esi + 0x28], eax
cmp ecx, ebx
je 0x4077a5
cmp ecx, 0xffffffff
je 0x4077a5
lea edx, [esi + 8]
push edx
lea edx, [ebp - 0x4c]
push edx
mov edx, dword [esi + 0x1c]
push edx
mov edx, dword [esi + 0x6c]
push eax
mov eax, dword [esi + 4]
or eax, 0x404
push eax
mov eax, dword [esi + 0x24]
push 1
push ebx
push edx
mov edx, dword [esi + 0x20]
push eax
push edx
push ecx
mov dword [ebp - 0x44], 0x4134cc
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x4077e5
mov eax, dword [esi + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push eax
call edi
mov ecx, dword [esi + 0x24]
push ecx
call edi
mov ecx, dword [esi + 0x1c]
lea edx, [esi + 8]
push edx
mov edx, dword [esi + 0x28]
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esi + 0x6c]
push edx
mov edx, dword [esi + 0x24]
or eax, 0x404
push eax
mov eax, dword [esi + 0x20]
push 1
push ebx
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x2c]
cmp eax, ebx
je 0x407802
cmp eax, 0xffffffff
je 0x407802
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov dword [esi + 0x2c], ebx
jmp 0x407808
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x30]
cmp eax, ebx
je 0x40781a
cmp eax, 0xffffffff
je 0x40781a
push eax
call edi
mov dword [esi + 0x30], ebx
mov eax, dword [esi + 0x34]
cmp eax, ebx
je 0x40782c
cmp eax, 0xffffffff
je 0x40782c
push eax
call edi
mov dword [esi + 0x34], ebx
cmp dword [ebp - 4], ebx
je 0x4078ab
mov edx, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CreateThread]
or dword [esi], 9
lea ecx, [ebp - 8]
push ecx
push ebx
push edx
push 0x406d70
push ebx
push ebx
call edi
mov ecx, dword [ebp + 8]
mov dword [esi + 0x50], eax
lea eax, [ebp - 8]
push eax
push ebx
push ecx
push 0x406e00
push ebx
push ebx
call edi
mov edx, dword [esi + 0xc]
push edx
mov dword [esi + 0x54], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
push ebx
push ecx
push 0x406cf0
push ebx
push ebx
call edi
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x407899
cmp eax, 0xffffffff
je 0x407899
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], ebx
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x4078bd
cmp eax, 0xffffffff
je 0x4078bd
push eax
call edi
mov dword [esi + 0x38], ebx
mov eax, dword [esi + 0x3c]
cmp eax, ebx
je 0x4078cf
cmp eax, 0xffffffff
je 0x4078cf
push eax
call edi
mov dword [esi + 0x3c], ebx
mov eax, dword [esi + 0x40]
cmp eax, ebx
je 0x4078e1
cmp eax, 0xffffffff
je 0x4078e1
push eax
call edi
mov dword [esi + 0x40], ebx
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret