Function at 0x401188
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 0
push 0x4065f0
push 0
call dword [sym.imp.MSVCRT.dll_setlocale]
add esp, 8
mov eax, dword [ebp + 8]
mov dword [0x4065d0], eax
mov ecx, dword [ebp + 8]
lea edx, [ecx*4 + 4]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [0x4065d4], eax
mov eax, dword [ebp + 8]
lea ecx, [eax*4 + 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x4065d4]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 0xd
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4 - 4]
push eax
call dword [sym.imp.MSVCRT.dll_wcschr]
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x401227
mov ecx, dword [ebp - 0x28]
mov word [ecx], 0
mov edx, dword [ebp + 0xc]
push edx
call fcn.00401539
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040173d
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x401268
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00402691
add esp, 0xc
mov dword [ebp - 0x14], eax
jmp 0x40127f
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004025d0
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x401295
mov edx, dword [ebp - 8]
push edx
lea eax, [ebp - 0x18]
push eax
call fcn.00401629
add esp, 8
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp + 8]
push edx
call fcn.00401629
add esp, 8
cmp dword [ebp - 0x18], 0
jle 0x4012c3
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401796
add esp, 0x10
cmp dword [0x4065d8], 0
je 0x4012e1
mov ecx, dword [0x4065d8]
push ecx
call dword [sym.imp.MSVCRT.dll__wcsdup]
add esp, 4
mov dword [ebp - 0x30], eax
jmp 0x4012f0
mov edx, dword [ebp - 0xc]
push edx
call fcn.004018c9
add esp, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [0x4065e8], eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00401831
add esp, 4
mov dword [0x4065e0], eax
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [0x4065e4]
push eax
call fcn.00401949
add esp, 8
mov dword [0x4065e4], eax
cmp dword [0x4065e4], 0
je 0x40133b
mov ecx, dword [0x4065e4]
push ecx
call fcn.004037c3
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4013e7
mov edx, dword [0x406010]
push edx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
mov eax, dword [0x4065e8]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
add esi, eax
lea ecx, [esi + esi + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 4], eax
mov edx, dword [0x4065e8]
push edx
mov eax, dword [0x406010]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
cmp dword [0x4065ec], 0
jne 0x4013b0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [0x4065e8]
push eax
call fcn.004036f3
add esp, 8
jmp 0x4013d2
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [0x4065e8]
push edx
push 0x406154
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fwprintf]
add esp, 0x10
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push str.setInitialArgsW
mov edx, dword [ebp - 0x20]
push edx
call fcn.004037e1
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x40141d
mov eax, dword [0x4065e4]
push eax
mov ecx, dword [0x4065d4]
push ecx
mov edx, dword [0x4065d0]
push edx
call dword [ebp - 0x2c]
add esp, 0xc
jmp 0x40146a
cmp dword [0x4065ec], 0
jne 0x40143d
mov eax, dword [0x406014]
push eax
mov ecx, dword [0x4065e8]
push ecx
call fcn.004036f3
add esp, 8
jmp 0x401462
mov edx, dword [0x406014]
push edx
mov eax, dword [0x4065e8]
push eax
push 0x406184
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fwprintf]
add esp, 0x10
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push str.runW
mov edx, dword [ebp - 0x20]
push edx
call fcn.004037e1
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40149d
mov eax, dword [0x4065dc]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [ebp - 0x10]
add esp, 0xc
mov dword [ebp - 0x24], eax
jmp 0x4014ea
cmp dword [0x4065ec], 0
jne 0x4014bd
mov eax, dword [0x406014]
push eax
mov ecx, dword [0x4065e8]
push ecx
call fcn.004036f3
add esp, 8
jmp 0x4014e2
mov edx, dword [0x406014]
push edx
mov eax, dword [0x4065e8]
push eax
push 0x4061a0
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fwprintf]
add esp, 0x10
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov edx, dword [ebp - 0x20]
push edx
call fcn.004037d2
add esp, 4
mov eax, dword [0x4065e4]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [0x4065e0]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [0x4065e8]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [ebp - 0x24]
pop esi
mov esp, ebp
pop ebp
ret