Function at 0x40d1e0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x64]
push ebx
push ebp
xor ebx, ebx
push esi
cmp eax, 4
push edi
mov dword [esp + 0x14], ebx
mov byte [esp + 0x13], bl
ja case.default.0x40d1fe
jmp dword [eax*4 + 0x40d440]
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
mov cl, byte [eax]
cmp cl, bl
je 0x40d22f
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x40d218
cmp byte [eax + 1], bl
je 0x40d229
mov byte [eax], 0x20
inc eax
mov cl, byte [eax]
cmp cl, bl
jne 0x40d218
mov esi, dword [0x417d20]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
cmp esi, ebx
mov dword [esp + 0x2c], 0x44
je 0x40d26e
lea eax, [esi - 1]
mov ecx, eax
mov edx, eax
sar ecx, 5
and edx, 0x1f
mov ecx, dword [ecx*4 + 0x417c20]
cmp byte [ecx + edx*8 + 4], bl
jne 0x40d26e
mov esi, eax
cmp esi, ebx
jne 0x40d24e
lea edx, [esi + esi*4 + 4]
push 1
mov word [esp + 0x62], dx
mov eax, dword [esp + 0x62]
and eax, 0xffff
push eax
call fcn.0040e650
mov dword [esp + 0x68], eax
mov dword [eax], esi
mov ecx, dword [esp + 0x68]
add esp, 8
xor eax, eax
cmp esi, ebx
lea edi, [ecx + 4]
lea ebp, [esi + ecx + 4]
jle 0x40d2dd
mov ecx, eax
mov edx, eax
sar ecx, 5
and edx, 0x1f
mov ecx, dword [ecx*4 + 0x417c20]
lea ecx, [ecx + edx*8]
mov dl, byte [ecx + 4]
test dl, 0x10
jne 0x40d2c7
mov byte [edi], dl
mov edx, dword [ecx]
mov dword [ebp], edx
jmp 0x40d2d0
mov byte [edi], bl
mov dword [ebp], 0xffffffff
inc eax
inc edi
add ebp, 4
cmp eax, esi
jl 0x40d2a2
mov ecx, dword [esp + 0x60]
cmp byte [esp + 0x13], bl
je 0x40d312
lea eax, [ecx + 4]
xor edx, edx
lea ecx, [esi + ecx + 4]
cmp esi, 3
mov edi, esi
jl 0x40d2f8
mov edi, 3
cmp edx, edi
jge 0x40d30b
mov byte [eax], bl
inc edx
mov dword [ecx], 0xffffffff
inc eax
add ecx, 4
jmp 0x40d2ec
mov eax, 8
jmp 0x40d316
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x84]
push edx
mov edx, dword [esp + 0x20]
push ebx
push ecx
push eax
mov eax, dword [esp + 0x8c]
push 1
push ebx
push ebx
push edx
push eax
mov dword [0x4144b0], ebx
mov dword [0x4144b4], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x60]
mov edi, eax
push ecx
call fcn.0040b5c0
add esp, 4
cmp esi, ebx
jne 0x40d37c
push edi
call fcn.0040add0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov eax, dword [esp + 0x74]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 2
jne 0x40d3a7
push ebx
call fcn.0040ace0
mov edx, dword [esp + 0x24]
add esp, 4
push edx
call esi
mov eax, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
cmp eax, ebx
jne 0x40d3e2
mov edx, dword [esp + 0x1c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x7c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0x1c]
push edx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
cmp eax, 4
jne 0x40d405
mov eax, dword [esp + 0x1c]
push eax
call esi
mov edx, dword [esp + 0x20]
mov dword [esp + 0x7c], ebx
push edx
call esi
mov eax, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x80], ecx
call esi
mov eax, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
pop edi
pop esi
mov dword [0x4144b4], ebx
pop ebp
mov dword [0x4144b0], 0x16
or eax, 0xffffffff
pop ebx
add esp, 0x60
ret