Function at 0x46c569
Capabilities:
Resolve path using msvcrt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x5a1014]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x248], edx
mov edx, ecx
mov ecx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [ebp - 0x23c], edx
mov eax, dword [edx + 0x9ec]
cmp ecx, eax
push esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
mov dword [ebp - 0x224], eax
sete al
cmp byte [ebp + 8], bl
mov dword [ebp - 0x24c], ebx
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x230], ebx
mov ebx, dword [sym.imp.tbbmalloc.dll_scalable_free]
push edi
mov dword [ebp - 0x220], ecx
mov byte [ebp - 0x211], al
je 0x46c90b
lea eax, [ebp - 0x210]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wgetcwd]
pop ecx
pop ecx
lea ecx, [ebp - 0x210]
call fcn.004562c9
mov edi, eax
push edi
mov dword [ebp - 0x24c], edi
call esi
inc eax
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x250]
pop ecx
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__get_wpgmptr]
pop ecx
test eax, eax
jne 0x4c224b
mov ecx, dword [ebp - 0x250]
call fcn.004562c9
push eax
mov dword [ebp - 0x244], eax
call esi
pop ecx
mov ecx, dword [0x5a300c]
inc eax
mov dword [ebp - 0x228], eax
call fcn.004562c9
push eax
mov dword [ebp - 0x234], eax
call esi
inc eax
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x220]
pop ecx
cmp eax, dword [ebp - 0x224]
jne 0x46c6e6
mov esi, dword [0x5a14b4]
sub esi, dword [0x5a14b0]
lea ecx, [esi + 2]
call fcn.0043d6d0
push esi
push dword [0x5a14b0]
mov dword [ebp - 0x218], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x218]
xor ecx, ecx
shr esi, 1
add esp, 0xc
mov word [eax + esi*2], cx
mov esi, eax
mov ecx, esi
call fcn.004562c9
push eax
mov dword [ebp - 0x218], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
inc eax
mov dword [ebp - 0x230], eax
pop ecx
test esi, esi
je 0x46c6e0
push esi
call ebx
pop ecx
mov eax, dword [ebp - 0x220]
mov edx, dword [ebp - 0x230]
mov ecx, eax
sub ecx, dword [ebp - 0x224]
mov esi, dword [ebp - 0x240]
neg ecx
sbb ecx, ecx
lea eax, [edx + 4]
not ecx
add esi, 0x12
and ecx, eax
add ecx, dword [ebp - 0x22c]
add ecx, dword [ebp - 0x228]
add esi, ecx
mov dword [ebp - 0x21c], esi
cmp esi, 0x10000
ja 0x4c2252
mov ebx, dword [ebp - 0x248]
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
mov edi, eax
lea eax, [esi + 0x42]
add eax, edi
pop ecx
mov ecx, eax
mov dword [ebp - 0x248], eax
call fcn.0043d6d0
mov ecx, dword [ebp - 0x21c]
push 4
pop edx
lea esi, [eax + 4]
mov dword [ebp - 0x224], eax
mov dword [esi], 0xf1
add ecx, 0x36
add esi, edx
mov dword [eax], edx
add ecx, edi
lea eax, [edi + 7]
mov dword [esi], ecx
add esi, edx
and dword [esi + 4], 0
mov word [esi], ax
mov eax, 0x1101
mov word [esi + 2], ax
lea eax, [edi + 1]
push eax
lea eax, [esi + 8]
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x23c]
lea ebx, [esi + edi]
add esp, 0xc
movzx eax, word [eax + 0x40]
sub eax, 0x14c
jne 0x4c22d3
push 3
pop eax
cmp byte [ebp + 8], 0
lea edi, [ebx + 9]
push 0xb
mov word [0x5a1084], ax
mov esi, 0x5a107c
pop ecx
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
je 0x46c8d9
mov eax, dword [ebp - 0x21c]
mov edi, dword [ebp - 0x240]
add eax, 0xfffffffe
mov esi, dword [ebp - 0x24c]
mov word [ebp - 0x23c], ax
mov dword [ebp - 0x23a], 0x113d
mov eax, dword [ebp - 0x23c]
mov dword [ebx + 0x36], eax
mov al, byte [ebp - 0x238]
mov byte [ebx + 0x3a], al
push edi
mov dword [ebx + 0x3b], 0x647763
add ebx, 0x3f
push esi
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add ebx, edi
mov edi, dword [ebp - 0x244]
push dword [ebp - 0x228]
mov dword [ebx], 0x657865
add ebx, 4
push edi
push ebx
call sub.VCRUNTIME140.dll_memcpy
add ebx, dword [ebp - 0x228]
add esp, 0xc
push dword [ebp - 0x22c]
mov dword [ebx], 0x626470
add ebx, 4
push dword [ebp - 0x234]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add ebx, dword [ebp - 0x22c]
add esp, 0xc
cmp byte [ebp - 0x211], 0
je 0x46c891
push dword [ebp - 0x230]
mov dword [ebx], 0x646d63
add ebx, 4
push dword [ebp - 0x218]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add ebx, dword [ebp - 0x230]
mov eax, dword [ebp - 0x234]
mov byte [ebx], 0
test eax, eax
je 0x46c8a6
push eax
call dword [sym.imp.tbbmalloc.dll_scalable_free]
pop ecx
test edi, edi
je 0x46c8b2
push edi
call dword [sym.imp.tbbmalloc.dll_scalable_free]
pop ecx
test esi, esi
je 0x46c8be
push esi
call dword [sym.imp.tbbmalloc.dll_scalable_free]
pop ecx
cmp byte [ebp - 0x211], 0
je 0x46c8d9
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x46c8d9
push eax
call dword [sym.imp.tbbmalloc.dll_scalable_free]
pop ecx
push dword [ebp - 0x220]
mov esi, dword [ebp - 0x224]
push dword [ebp - 0x248]
push esi
call dword [0x5a1b60]
push esi
call dword [sym.imp.tbbmalloc.dll_scalable_free]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047a40f
leave
ret 8
xor esi, esi
mov byte [ebp - 0x211], al
mov dword [ebp - 0x21c], esi
jmp 0x46c728
xor ecx, ecx
call fcn.0047dc27
mov cl, byte [ebp - 0x211]
mov eax, dword [ebp - 0x220]
mov byte [ebp - 0x211], cl
cmp eax, dword [ebp - 0x224]
jne 0x4c229a
push 0xfffffffffffffffc
pop eax
sub eax, edx
add esi, eax
mov eax, dword [ebp - 0x218]
mov dword [ebp - 0x21c], esi
test eax, eax
je 0x4c2287
push eax
call ebx
pop ecx
mov byte [ebp - 0x211], 0
cmp esi, 0x10000
jbe 0x46c728
mov eax, dword [ebp - 0x234]
xor esi, esi
mov byte [ebp + 8], 0
mov dword [ebp - 0x21c], esi
test eax, eax
je 0x4c22b4
push eax
call ebx
pop ecx
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x4c22c2
push eax
call ebx
pop ecx
test edi, edi
je 0x46c728
push edi
call ebx
pop ecx
jmp 0x46c728
sub eax, 0x78
je 0x4c2328
sub eax, 0x38a0
je 0x4c231e
sub eax, 0x4c00
je 0x4c2314
sub eax, 0x1fea
je 0x4c230a
sub eax, 0x416
je 0x4c2300
push 0x45b
push 0
call fcn.0047dc0b
mov eax, 0xf6
jmp 0x46c7ae
mov eax, 0xf9
jmp 0x46c7ae
mov eax, 0xd0
jmp 0x46c7ae
mov eax, 0xf7
jmp 0x46c7ae
mov eax, 0xf4
jmp 0x46c7ae