Function at 0x4156c0
Capabilities:
Resolve path using msvcrt

Disassembly:
sub esp, 0x618
mov ecx, dword [0x401fe0]
mov eax, dword [0x401fdc]
mov dx, word [0x401fe4]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov al, byte [0x401fe6]
lea ecx, [esp + 0x114]
push 0x104
push ecx
mov word [esp + 0x10], dx
mov byte [esp + 0x12], al
call dword [sym.imp.MSVCRT.dll__getcwd]
add esp, 8
test eax, eax
jne 0x415716
push 0x3e8
push eax
call fcn.00431660
add esp, 8
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x124]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x481170]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0x104
lea eax, [esp + 0x24]
mov esi, ecx
push edx
push eax
inc esi
call dword [sym.imp.MSVCRT.dll__fullpath]
add esp, 0xc
test eax, eax
jne 0x41575a
push 0x3e8
push eax
call fcn.00431660
add esp, 8
call dword [sym.imp.MSVCRT.dll___p__pgmptr]
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x20]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov eax, esi
dec ecx
add eax, edx
lea edi, [ecx + eax + 0x23]
push edi
call fcn.00451b20
mov ebx, eax
lea ecx, [esi + 0x14]
mov dword [ebx + 0xc], ecx
mov ecx, esi
mov edx, ecx
mov dword [ebx], edi
lea esi, [esp + 0x124]
lea edi, [ebx + 0x14]
shr ecx, 2
mov dword [ebx + 4], 1
mov dword [ebx + 8], 0x14
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [ebx + 0xc]
mov esi, dword [sym.imp.MSVCRT.dll___p__pgmptr]
mov byte [ebx + ebp], 0x22
inc ebp
call esi
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
call esi
mov esi, dword [eax]
mov eax, edi
lea edi, [ebx + ebp]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll___p__pgmptr]
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ebp, ecx
mov ecx, dword [esp + 0x10]
mov byte [ebx + ebp], 0x22
inc ebp
lea eax, [ebx + ebp]
add ebp, 0xa
mov dword [eax], ecx
mov cx, word [esp + 0x18]
mov dword [eax + 4], edx
mov edx, ebp
mov word [eax + 8], cx
mov ecx, dword [ebx + 0xc]
sub edx, ecx
inc ebp
mov dword [ebx + 0x10], edx
mov byte [ebx + ebp - 1], 0x22
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebx + ebp]
mov eax, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ebp, ecx
mov byte [ebx + ebp], 0x22
mov byte [ebx + ebp + 1], al
mov ecx, dword [0x481250]
mov edx, dword [ecx]
call dword [edx + 0x78]
test eax, eax
jne 0x4158ad
mov ecx, dword [0x481254]
lea edx, [esp + 0x228]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
sub eax, 2
jne 0x41589e
call fcn.00431700
push 0x3e8
push 0
call fcn.00431660
add esp, 8
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x618
ret