Function at 0x402c80
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x64
xor eax, eax
mov dword [esp + 8], eax
push ebx
mov byte [esp + 7], al
push esi
mov esi, dword [esp + 0x70]
push edi
push ebp
cmp esi, 4
ja case.default.0x402c9a
jmp dword [esi*4 + 0x402ec4]
mov eax, 0xffffffff
pop ebp
mov dword [0x406044], 0x16
mov dword [0x406048], 0
pop edi
pop esi
pop ebx
add esp, 0x64
ret
mov byte [esp + 0x13], 1
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x1c], ecx
mov al, byte [ecx]
test al, al
je 0x402ced
inc ecx
cmp byte [ecx], 0
jne 0x402cd8
lea eax, [ecx + 1]
cmp byte [eax], 0
je 0x402cd2
mov byte [ecx], 0x20
mov ecx, eax
jmp 0x402cd2
lea edi, [esp + 0x30]
xor eax, eax
mov ecx, 0x11
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], 0x44
mov edi, dword [0x406fe0]
cmp edi, eax
je 0x402d30
xor ecx, ecx
lea ebx, [edi - 1]
mov eax, ebx
mov edx, ebx
and eax, 0xffffffe7
and edx, 0x1f
sar eax, 3
mov ebp, dword [eax + 0x406ee0]
cmp byte [ebp + edx*8 + 4], cl
jne 0x402d30
mov edi, ebx
test ebx, ebx
jne 0x402d0e
mov eax, edi
push 1
imul ax, ax, 5
add ax, 4
mov word [esp + 0x66], ax
xor eax, eax
mov ax, word [esp + 0x66]
push eax
call fcn.00403eb0
mov dword [esp + 0x6c], eax
add esp, 8
xor ecx, ecx
mov dword [eax], edi
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x64]
add edx, 4
lea ebx, [eax + edi + 4]
test edi, edi
jle 0x402da4
mov eax, ecx
mov ebp, ecx
and eax, 0xffffffe7
and ebp, 0x1f
sar eax, 3
mov eax, dword [eax + 0x406ee0]
lea ebp, [eax + ebp*8]
mov al, byte [ebp + 4]
test al, 0x10
jne 0x402d92
mov byte [edx], al
mov eax, dword [ebp]
mov dword [ebx], eax
jmp 0x402d9b
mov byte [edx], 0
mov dword [ebx], 0xffffffff
inc ecx
inc edx
add ebx, 4
cmp ecx, edi
jl 0x402d6c
cmp byte [esp + 0x13], 0
je 0x402de0
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x64]
add ecx, 4
lea eax, [eax + edi + 4]
cmp edi, 3
jl 0x402dc4
mov edi, 3
test edi, edi
jle 0x402dd8
mov byte [ecx], 0
inc ecx
mov dword [eax], 0xffffffff
add eax, 4
dec edi
jne 0x402dc8
mov dword [esp + 0x18], 8
xor edi, edi
lea eax, [esp + 0x20]
lea ecx, [esp + 0x30]
push eax
mov edx, dword [esp + 0x88]
push ecx
mov eax, dword [esp + 0x20]
push edi
push edx
mov dword [0x406044], edi
mov ecx, dword [esp + 0x2c]
push eax
mov edx, dword [esp + 0x90]
push 1
push edi
mov dword [0x406048], edi
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebx, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
mov ebp, eax
mov eax, dword [esp + 0x64]
push eax
call fcn.004029f0
add esp, 4
test ebx, ebx
jne 0x402e50
push ebp
call fcn.00403270
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x64
ret
cmp esi, 2
jne 0x402e61
push 0
call fcn.004015e0
add esp, 4
jmp 0x402ead
test esi, esi
jne 0x402e8f
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [esp + 0x14]
mov eax, dword [esp + 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402ead
mov eax, dword [esp + 0x20]
cmp esi, 4
jne 0x402ea9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], 0
jmp 0x402ead
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x64
ret