Function at 0x40168c
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x411284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
cmp word [eax], 0x22
je 0x4016b2
push 0x20
jmp 0x4016b7
push 0x22
add eax, 4
pop ecx
push ecx
push eax
call fcn.00401a7c
pop ecx
pop ecx
test eax, eax
jne 0x4016d1
mov dword [ebp - 0x320], 0x40fac8
jmp 0x4016f5
lea esi, [eax + 2]
jmp 0x4016e7
push 8
push eax
call fcn.0040258b
pop ecx
pop ecx
test eax, eax
je 0x4016ef
add esi, 2
movzx eax, word [esi]
test ax, ax
jne 0x4016d6
mov dword [ebp - 0x320], esi
mov ebx, 0x104
push ebx
mov esi, 0x412b60
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp word [0x412b60], 0x22
je 0x40171b
mov dword [ebp - 0x318], esi
jmp 0x401728
mov dword [ebp - 0x318], 0x412b62
sub eax, 2
mov edx, dword [ebp - 0x318]
xor ecx, ecx
mov word [edx + eax*2], cx
lea eax, [ebp - 0x310]
push eax
mov byte [0x411ec0], 0x50
call fcn.004010ac
mov edi, eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], str.Failed_to_find_shebang
push eax
call fcn.00401000
pop ecx
lea eax, [edi + 0x104]
xor esi, esi
pop ecx
mov ecx, edi
cmp edi, eax
jae 0x401782
mov dl, byte [ecx]
cmp dl, 0xd
je 0x401780
cmp dl, 0xa
je 0x401780
inc ecx
cmp ecx, eax
jb 0x40176d
jmp 0x401782
mov esi, ecx
xor eax, eax
test esi, esi
setne al
push str.Expected_to_find_terminator_in_shebang_line
push eax
call fcn.00401000
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x20c]
push eax
mov byte [esi], 0
sub esi, edi
push esi
push edi
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
xor eax, eax
xor ebx, ebx
cmp esi, ebx
setne al
push str.Expected_to_decode_shebang_line_using_UTF_8
push eax
call fcn.00401000
xor eax, eax
mov word [ebp + esi*2 - 0x20c], ax
pop ecx
pop ecx
lea esi, [ebp - 0x20c]
cmp word [ebp - 0x20c], bx
je 0x4017fc
movzx eax, word [esi]
push 8
push eax
call fcn.0040258b
pop ecx
pop ecx
test eax, eax
je 0x4017fc
add esi, 2
cmp word [esi], bx
jne 0x4017e3
xor eax, eax
cmp word [esi], 0x23
push str.Expected_to_find__at_start_of_shebang_line
sete al
push eax
call fcn.00401000
pop ecx
pop ecx
push 2
pop edi
jmp 0x401825
push 8
push eax
call fcn.0040258b
pop ecx
pop ecx
test eax, eax
je 0x40182f
add esi, edi
movzx eax, word [esi]
cmp ax, bx
jne 0x401817
xor eax, eax
cmp word [esi], 0x21
push str.Expected_to_find___following__in_shebang_line
sete al
push eax
call fcn.00401000
pop ecx
pop ecx
jmp 0x401855
push 8
push eax
call fcn.0040258b
pop ecx
pop ecx
test eax, eax
je 0x40185f
add esi, edi
movzx eax, word [esi]
cmp ax, bx
jne 0x401847
lea eax, [ebp - 0x314]
push eax
push esi
mov dword [ebp - 0x314], ebx
call fcn.004014dd
mov dword [ebp - 0x31c], eax
xor eax, eax
cmp dword [ebp - 0x31c], ebx
push str.Expected_to_find_executable_in_shebang_line
setne al
push eax
call fcn.00401000
xor eax, eax
cmp dword [ebp - 0x314], ebx
push str.Expected_to_find_arguments__even_if_empty__in_shebang_line
setne al
push eax
call fcn.00401000
mov eax, dword [ebp - 0x31c]
add esp, 0x18
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, edi
cmp dx, bx
jne 0x4018b0
sub eax, ecx
sar eax, 1
mov esi, eax
mov eax, dword [ebp - 0x314]
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, edi
cmp dx, bx
jne 0x4018c9
sub eax, ecx
sar eax, 1
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x318]
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, edi
cmp dx, bx
jne 0x4018e6
sub eax, ecx
sar eax, 1
mov ecx, eax
mov eax, dword [ebp - 0x320]
lea edx, [eax + 2]
mov bx, word [eax]
add eax, edi
test bx, bx
jne 0x4018ff
sub eax, edx
sar eax, 1
add ecx, eax
add ecx, dword [ebp - 0x324]
push edi
lea esi, [ecx + esi + 8]
push esi
call fcn.00401add
mov edi, eax
xor eax, eax
test edi, edi
setne al
push str.Expected_to_be_able_to_allocate_command_line_memory
push eax
call fcn.00401000
push dword [ebp - 0x320]
push dword [ebp - 0x318]
push dword [ebp - 0x314]
push dword [ebp - 0x31c]
push str.__ls___ls___ls___ls
push esi
push esi
push edi
call fcn.004021f7
add esp, 0x30
push edi
call fcn.0040134c
int3