Function at 0x40b47b
Capabilities:
Resolve path using msvcrt
Terminate process

Disassembly:
push 0x554
push 0x410f48
call fcn.00410e90
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x278], edi
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x50
xor ebx, ebx
push ebx
lea eax, [ebp - 0x274]
push eax
call sub.VCRUNTIME140.dll_memset
push 0x2cc
push ebx
lea eax, [ebp - 0x564]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
mov dword [ebp - 4], ebx
push 0x401d78
push 2
pop eax
push eax
call dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
pop ecx
pop ecx
call fcn.0040c69e
push fcn.0040b406
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler]
pop ecx
xor esi, esi
inc esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x27c], esi
cmp esi, ebx
jge 0x40b637
lea eax, [edi + esi*4]
mov ecx, dword [eax]
movzx eax, word [ecx]
cmp eax, 0x2d
je 0x40b50c
cmp eax, 0x2f
jne 0x40b555
lea edi, [edi + esi*4]
push 0x401d80
lea eax, [ecx + 2]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40b558
xor ecx, ecx
call fcn.0040b409
mov eax, ebx
sub eax, esi
lea eax, [eax*4 - 4]
push eax
lea eax, [edi + 4]
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
dec ebx
mov dword [ebp + 8], ebx
dec esi
mov dword [ebp - 0x27c], esi
mov edi, dword [ebp - 0x278]
inc esi
jmp 0x40b4ec
push 0x401da4
mov eax, dword [edi]
add eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40b574
xor ecx, ecx
inc ecx
jmp 0x40b526
push 0x401dcc
mov eax, dword [edi]
add eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40b590
push 2
pop ecx
jmp 0x40b526
push 0x401df0
mov eax, dword [edi]
add eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40b5ab
push 3
jmp 0x40b58d
push 0x401e14
mov eax, dword [edi]
add eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40b5fb
mov byte [0x4323fb], 1
mov eax, ebx
sub eax, esi
lea eax, [eax*4 - 4]
push eax
lea eax, [edi + 4]
mov edi, dword [ebp - 0x278]
lea ecx, [edi + esi*4]
push eax
push ecx
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
dec ebx
mov dword [ebp + 8], ebx
dec esi
mov dword [ebp - 0x27c], esi
jmp 0x40b555
push 0x401e38
mov eax, dword [edi]
add eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40b54f
mov byte [0x4323fa], 1
mov eax, ebx
sub eax, esi
lea eax, [eax*4 - 4]
push eax
mov edi, dword [ebp - 0x278]
lea ecx, [edi + esi*4]
lea eax, [ecx + 4]
jmp 0x40b5e1
cmp byte [0x4323fb], 0
je 0x40b648
xor eax, eax
mov word [0], ax
call fcn.0040ac2b
cmp dword [0x421ee8], 0
jne 0x40b6da
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p__wpgmptr]
mov esi, dword [eax]
push 0x20
pop edx
mov ecx, esi
call fcn.00403727
test eax, eax
je 0x40b6ce
mov ebx, esi
lea ecx, [ebx + 2]
push 2
pop edx
xor edi, edi
mov ax, word [ebx]
add ebx, edx
cmp ax, di
jne 0x40b67a
sub ebx, ecx
sar ebx, 1
add ebx, 3
xor ecx, ecx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.004036fa
mov edi, eax
push 0x40104c
push ebx
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push esi
push ebx
push edi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
call esi
push 0x40104c
push ebx
push edi
call esi
add esp, 0x24
mov esi, edi
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x278]
mov ecx, esi
call fcn.0040e267
mov dword [0x421ee8], eax
push 0x40c3c9
push 2
pop eax
push eax
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
call esi
push 0x40c3c9
push 0xf
call esi
add esp, 0xc
mov edx, edi
mov ecx, ebx
call fcn.0040b9e8
mov esi, eax
call fcn.0040c479
cmp byte [0x411020], 0
jne 0x40b713
xor esi, esi
inc esi
push esi
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
lea eax, [ebp - 0x564]
push eax
lea edx, [ebp - 0x274]
mov ecx, dword [ebp - 0x14]
call fcn.0040b410
ret