Function at 0x40b170
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x10]
push esi
mov esi, ecx
test eax, eax
je 0x40b3c8
cmp word [eax], 0
je 0x40b3c8
push edi
push 0x40
lea eax, [ebp - 0x58]
push 0
push eax
mov dword [ebp + 8], 0
mov dword [ebp - 0x5c], 0x44
call fcn.004b03e0
mov ecx, dword [0x50b3a4]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
call fcn.0044e690
mov edi, eax
lea eax, [esi + 0x1b4]
mov dword [ebp - 4], edi
mov dword [ebp - 8], eax
lea edx, [eax + 2]
jmp 0x40b1e0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b1e0
mov ecx, dword [ebx + 0x10]
sub eax, edx
sar eax, 1
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40b1f5
sub ecx, esi
sar ecx, 1
test edi, edi
je 0x40b224
mov edx, edi
lea edi, [edx + 2]
lea ecx, [ecx]
mov si, word [edx]
add edx, 2
test si, si
jne 0x40b210
sub edx, edi
sar edx, 1
add edx, 0x20
jmp 0x40b226
xor edx, edx
add edx, ecx
lea edi, [edx + eax + 0x80]
lea ecx, [edi + edi]
push ecx
call fcn.004412a0
mov esi, eax
add esp, 4
test esi, esi
je 0x40b3b5
mov ecx, dword [ebp - 8]
push ecx
push edi
mov edx, 0x22
xor eax, eax
push esi
mov word [esi], dx
mov word [esi + 2], ax
call fcn.00401880
push 0x4c2924
push edi
push esi
call fcn.00401880
mov eax, dword [ebp - 4]
test eax, eax
je 0x40b29a
cmp word [eax], 0
je 0x40b29a
push str._config__
push edi
push esi
call fcn.00401880
mov edx, dword [ebp - 4]
push edx
push edi
push esi
call fcn.00401880
push 0x4c2924
push edi
push esi
call fcn.00401880
push 0x4c2904
push edi
push esi
call fcn.00401880
mov eax, dword [ebx + 0x10]
push eax
push edi
push esi
call fcn.00401880
mov eax, dword [ebx + 0x1c]
test eax, eax
jne 0x40b2c6
cmp dword [ebx + 0x20], eax
jne 0x40b2c2
cmp dword [ebx + 0x24], eax
je 0x40b2df
test eax, eax
je 0x40b2cd
push str.__new_console:a
jmp 0x40b2d8
cmp dword [ebx + 0x20], 0
je 0x40b2df
push str.__new_console:r
push edi
push esi
call fcn.00401880
cmp dword [ebx + 0x1c], 0
jne 0x40b323
cmp dword [ebx + 0x20], 0
jne 0x40b323
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x40b323
cmp word [eax], 0
je 0x40b323
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebx + 0x14]
lea edx, [ebp - 0x5c]
push edx
push ecx
mov ecx, dword [ebx + 0x28]
push 0
push 0x4000020
push esi
push 0
push 1
lea edx, [ebx + 0x2c]
push edx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
mov edi, eax
jmp 0x40b347
mov ecx, dword [ebx + 0x14]
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x5c]
push eax
push ecx
push 0
push 0x20
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp + 8], eax
mov edi, eax
test edi, edi
jne 0x40b373
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push str.Failed_to_start_new_ConEmu_window
push 0x10
push eax
push esi
call fcn.004200b0
add esp, 0x14
xor eax, eax
test edi, edi
pop edi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40b38f
mov dword [ebp - 0x18], 0
cmp eax, 0xffffffff
je 0x40b38f
push eax
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40b3b8
mov dword [ebp - 0x14], 0
cmp eax, 0xffffffff
je 0x40b3b8
push eax
call esi
xor eax, eax
test edi, edi
pop edi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp + 8]
xor eax, eax
test edi, edi
pop edi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret 4
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4