Function at 0x406e33
Capabilities:
Resolve path using msvcrt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov eax, dword [0x411014]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [0x421eec], 0
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov bl, dl
mov dword [ebp - 0x420], ecx
push edi
mov bh, bl
mov dword [ebp - 0x43c], eax
jne 0x406e75
call fcn.004075c7
mov ecx, dword [ebp - 0x420]
mov dword [0x421eec], eax
movzx eax, word [ecx]
and dword [ebp - 0x444], 0
mov edx, eax
mov dword [ebp - 0x440], 1
push 2
pop edi
cmp eax, 0x2d
je 0x406eb9
cmp edx, 0x40
jne 0x406eab
add ecx, edi
cmp byte [ebp + 8], 0
mov dword [ebp - 0x420], ecx
setne bl
dec bl
and bl, bh
mov bh, byte [ebp + 0xc]
mov byte [ebp - 0x422], bh
jmp 0x406f52
add ecx, edi
mov byte [ebp - 0x422], 1
mov dword [ebp - 0x420], ecx
movzx eax, word [ecx]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswdigit]
pop ecx
test eax, eax
je 0x406f45
mov esi, dword [ebp - 0x420]
lea eax, [ebp - 0x420]
push 0xa
push eax
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
add esp, 0xc
mov dword [0x431ef0], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0x22
jne 0x406f1c
mov eax, dword [ebp - 0x420]
xor ecx, ecx
push esi
push 0x436
mov word [eax], cx
xor eax, eax
push eax
call fcn.004053f6
add esp, 0xc
mov eax, dword [ebp - 0x420]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswspace]
jmp 0x406f38
mov eax, dword [ebp - 0x420]
add eax, edi
mov dword [ebp - 0x420], eax
movzx eax, word [eax]
push eax
call esi
pop ecx
test eax, eax
jne 0x406f2a
jmp 0x406f4c
or dword [0x431ef0], 0xffffffff
mov ecx, dword [ebp - 0x420]
xor eax, eax
cmp word [ecx], ax
je 0x4075b0
mov edx, ecx
xor edi, edi
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, di
jne 0x406f64
sub edx, esi
mov eax, 0x8000
sar edx, 1
cmp edx, eax
jae 0x406f94
push ecx
push eax
push 0x411490
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov ecx, dword [ebp - 0x420]
add esp, 0xc
jmp 0x406f9c
xor eax, eax
mov word [0x411490], ax
call fcn.0040e267
mov esi, eax
mov dword [ebp - 0x438], esi
test bl, bl
je 0x406fbf
push esi
push 0x401744
call fcn.0040c7c7
pop ecx
pop ecx
call fcn.0040c7a9
xor eax, eax
lea ecx, [ebp - 0x42c]
push esi
xor edx, edx
call fcn.004055d7
cmp dword [ebp - 0x42c], edi
jne 0x406fde
xor esi, esi
jmp 0x407543
mov esi, dword [ebp - 0x42c]
xor ecx, ecx
push 4
pop edx
mov dword [ebp - 0x428], esi
lea eax, [esi + 8]
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.0040ac3c
push dword [ebp - 0x438]
mov edi, eax
lea ecx, [ebp - 0x42c]
mov edx, edi
call fcn.004055d7
cmp dword [edi], 0
je 0x4070e2
mov eax, dword [0x421ee8]
test eax, eax
je 0x4070e2
push eax
push dword [edi]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4070e2
cmp dword [0x411488], eax
jne 0x4070db
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p__wpgmptr]
push 0x401058
mov ebx, dword [eax]
push ebx
mov dword [0x411488], ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcspbrk]
pop ecx
pop ecx
test eax, eax
je 0x4070db
mov esi, dword [0x411488]
xor edx, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x407075
sub esi, ecx
xor ecx, ecx
sar esi, 1
add esi, 3
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.0040ac3c
push 0x40104c
push esi
push eax
mov dword [0x411488], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
push esi
push dword [0x411488]
call ebx
add esp, 0xc
push 0x40104c
push esi
push dword [0x411488]
call ebx
mov esi, dword [ebp - 0x428]
add esp, 0xc
mov eax, dword [0x411488]
mov dword [edi], eax
cmp byte [ebp + 8], 0
jne 0x40712a
lea eax, [ebp - 0x430]
mov edx, edi
push eax
mov ecx, esi
call fcn.00406406
test al, al
je 0x406fd7
mov esi, dword [ebp - 0x430]
test esi, esi
je 0x407543
mov ebx, dword [ebp - 0x43c]
test ebx, ebx
je 0x407543
mov ecx, dword [edi]
call fcn.0040e267
mov dword [ebx], eax
jmp 0x407543
push 0x401750
push dword [ebp - 0x420]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcspbrk]
mov ebx, eax
mov edx, edi
pop ecx
neg ebx
lea eax, [ebp - 0x430]
pop ecx
sbb bl, bl
mov ecx, esi
push eax
inc bl
call fcn.00406406
test al, al
je 0x407166
mov esi, dword [ebp - 0x430]
xor ebx, ebx
jmp 0x407494
mov esi, dword [ebp - 0x420]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x444]
jne 0x407171
sub ecx, edx
sar ecx, 1
cmp ecx, 0x1000
jae 0x407197
test bl, bl
jne 0x407197
inc bl
jmp 0x40731d
or dword [ebp - 0x434], 0xffffffff
mov edx, esi
or dword [ebp - 0x428], 0xffffffff
xor ebx, ebx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, bx
jne 0x4071ac
sub edx, ecx
lea eax, [ebp - 0x428]
push eax
sar edx, 1
lea eax, [ebp - 0x434]
push eax
inc edx
mov ecx, esi
call fcn.004066dc
mov byte [ebp - 0x421], al
test al, al
jne 0x407270
mov ecx, dword [ebp - 0x420]
push 2
pop esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, esi
cmp ax, bx
jne 0x4071eb
sub ecx, edx
sar ecx, 1
cmp ecx, 0x8000
jb 0x407215
push dword [ebp - 0x420]
push 0x447
push ebx
call fcn.004053f6
add esp, 0xc
cmp dword [ebp - 0x434], 0xffffffff
jne 0x407227
cmp dword [ebp - 0x428], 0xffffffff
je 0x407253
push dword [ebp - 0x438]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov ecx, dword [ebp - 0x420]
call fcn.0040e267
push eax
mov edx, edi
mov dword [ebp - 0x438], eax
lea ecx, [ebp - 0x42c]
call fcn.004055d7
push ecx
mov ecx, dword [edi]
lea edx, [ebp - 0x214]
call fcn.0040699d
test al, al
jne 0x407357
mov byte [ebp - 0x421], 1
mov esi, dword [ebp - 0x430]
cmp dword [ebp - 0x434], 0xffffffff
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
je 0x4072c3
xor eax, eax
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
pop ecx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
pop ecx
push eax
push dword [ebp - 0x434]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup2]
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x4072ba
xor eax, eax
push 0x411
push eax
call fcn.004053f6
pop ecx
pop ecx
push dword [ebp - 0x434]
call ebx
pop ecx
cmp dword [ebp - 0x428], 0xffffffff
je 0x407309
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
pop ecx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
pop ecx
push eax
push dword [ebp - 0x428]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup2]
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x407300
xor eax, eax
push 0x411
push eax
call fcn.004053f6
pop ecx
pop ecx
push dword [ebp - 0x428]
call ebx
pop ecx
mov bl, byte [ebp - 0x421]
test bl, bl
je 0x407494
mov esi, dword [ebp - 0x420]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x444]
jne 0x407322
sub ecx, edx
sar ecx, 1
push esi
cmp ecx, 0x1000
jae 0x407474
push 0x8000
push 0x411490
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
jmp 0x407481
push 0x22
pop eax
cmp word [ebp - 0x214], ax
jne 0x4073c3
lea esi, [ebp - 0x214]
push 2
lea ecx, [esi + 2]
pop edx
mov ax, word [esi]
add esi, edx
cmp ax, bx
jne 0x40736f
sub esi, ecx
sar esi, 1
push 0x22
pop ebx
cmp word [ebp + esi*2 - 0x216], bx
jne 0x4073c6
lea eax, [esi + esi]
push eax
lea eax, [ebp - 0x212]
push eax
lea eax, [ebp - 0x214]
push eax
call sub.VCRUNTIME140.dll_memmove
lea esi, [esi*2 - 4]
add esp, 0xc
cmp esi, 0x208
jae 0x4075c1
xor eax, eax
mov word [ebp + esi - 0x214], ax
jmp 0x4073c6
push 0x22
pop ebx
lea eax, [ebp - 0x214]
push 0x20
push eax
mov dword [edi], eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x407422
lea eax, [ebp - 0x214]
mov word [ebp - 0x41c], bx
push eax
lea eax, [ebp - 0x41a]
push 0x103
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x41c]
push 0x40104c
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea eax, [ebp - 0x41c]
add esp, 0xc
mov dword [edi], eax
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call ebx
xor ecx, ecx
push edi
mov dword [eax], ecx
lea eax, [ebp - 0x214]
push eax
push ecx
call dword [sym.imp.api_ms_win_crt_process_l1_1_0.dll__wspawnvp]
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x407276
call ebx
cmp dword [eax], 0xc
je 0x407276
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___doserrno]
cmp dword [eax], 0xc1
jne 0x407276
mov byte [ebp - 0x421], 1
jmp 0x407276
xor eax, eax
push 0x447
push eax
call fcn.004053f6
mov edx, dword [ebp - 0x42c]
add esp, 0xc
xor ecx, ecx
push edi
call fcn.00405bd5
mov esi, eax
cmp esi, 0xffffffff
jne 0x40751e
cmp byte [ebp - 0x422], 0
jne 0x406fd7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
xor ecx, ecx
mov eax, dword [eax]
sub eax, ecx
je 0x407522
push 2
pop ecx
sub eax, ecx
je 0x40750c
sub eax, 0xa
je 0x4074fa
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
lea eax, [ebp - 0x3a4]
push 0xc8
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wcserror_s]
add esp, 0xc
lea eax, [ebp - 0x3a4]
push eax
push 0x415
xor eax, eax
push eax
call fcn.004053f6
add esp, 0xc
jmp 0x407522
lea eax, [edi + 8]
test bl, bl
jne 0x407503
mov eax, edi
push dword [eax]
push 0x43a
jmp 0x4074ed
push dword [edi]
xor eax, eax
push 0x439
push eax
call fcn.004053f6
add esp, 0xc
test esi, esi
je 0x407543
cmp dword [ebp - 0x43c], 0
je 0x407543
lea ecx, [edi + 8]
test bl, bl
jne 0x407534
mov ecx, edi
mov ecx, dword [ecx]
call fcn.0040e267
mov ecx, dword [ebp - 0x43c]
mov dword [ecx], eax
xor eax, eax
mov ecx, eax
mov eax, dword [ebp - 0x42c]
add eax, 8
je 0x407578
mov edx, dword [ebp - 0x438]
test edi, edi
je 0x407595
cmp dword [edi + ecx*4], 0
je 0x407585
cmp dword [edi + ecx*4], edx
je 0x40756e
inc ecx
cmp ecx, eax
jb 0x407558
jmp 0x407585
xor eax, eax
mov byte [ebp - 0x440], al
jmp 0x407585
xor eax, eax
inc eax
mov dword [ebp - 0x440], eax
test edi, edi
je 0x407598
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x440]
pop ecx
jmp 0x407598
xor eax, eax
inc eax
mov ecx, dword [ebp - 0x438]
test ecx, ecx
je 0x4075ae
test al, al
je 0x4075ae
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410365
leave
ret 0xc
call fcn.00410495
int3