Function at 0x419700
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x4d3804]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x420], ecx
mov eax, dword [ebp - 0x420]
cmp dword [eax + 4], 0
jne 0x419735
push 0x45a
call dword [sym.imp.kernel32.dll_SetLastError]
xor eax, eax
jmp 0x419a8b
mov ecx, dword [ebp - 0x420]
cmp dword [ecx + 0x10], 0
je 0x41974b
mov eax, 1
jmp 0x419a8b
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0x420]
mov eax, dword [edx + 0x18]
and eax, 0x10
je 0x4199f1
mov dword [ebp - 0x418], 0x1000
push 0x1000
call fcn.0047d781
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x419793
push 8
call dword [sym.imp.kernel32.dll_SetLastError]
xor eax, eax
jmp 0x419a8b
mov ecx, dword [ebp - 8]
mov byte [ecx], 0
mov edx, dword [ebp - 0x420]
cmp dword [edx + 0x14], 0
je 0x4197cc
mov eax, dword [ebp - 0x420]
mov ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.0047d170
add esp, 8
push 0x4b28e0
mov eax, dword [ebp - 8]
push eax
call fcn.0047d170
add esp, 8
push 0x4b28e4
mov ecx, dword [ebp - 8]
push ecx
call fcn.0047d170
add esp, 8
mov dword [ebp - 0x414], 0x400
lea edx, [ebp - 0x410]
push edx
push 0x400
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
test eax, eax
jbe 0x419825
mov byte [ebp - 0x11], 0
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.0047d170
add esp, 8
push 0x4b28e8
mov edx, dword [ebp - 8]
push edx
call fcn.0047d170
add esp, 8
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x4198f0
mov byte [ebp - 0x11], 0
lea ecx, [ebp - 0x410]
push ecx
call fcn.0047c670
add esp, 4
lea edx, [ebp + eax - 0x411]
mov dword [ebp - 0x41c], edx
jmp 0x419872
mov eax, dword [ebp - 0x41c]
sub eax, 1
mov dword [ebp - 0x41c], eax
mov ecx, dword [ebp - 0x41c]
lea edx, [ebp - 0x410]
cmp ecx, edx
jb 0x4198b9
mov eax, dword [ebp - 0x41c]
movsx ecx, byte [eax]
cmp ecx, 0x5c
je 0x4198ac
mov edx, dword [ebp - 0x41c]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x4198ac
mov ecx, dword [ebp - 0x41c]
movsx edx, byte [ecx]
cmp edx, 0x3a
jne 0x4198b7
mov eax, dword [ebp - 0x41c]
mov byte [eax], 0
jmp 0x4198b9
jmp 0x419863
lea ecx, [ebp - 0x410]
push ecx
call fcn.0047c670
add esp, 4
test eax, eax
jbe 0x4198f0
lea edx, [ebp - 0x410]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.0047d170
add esp, 8
push 0x4b28ec
mov ecx, dword [ebp - 8]
push ecx
call fcn.0047d170
add esp, 8
push 0x400
lea edx, [ebp - 0x410]
push edx
push 0x4b28f0
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x419933
mov byte [ebp - 0x11], 0
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.0047d170
add esp, 8
push 0x4b2900
mov edx, dword [ebp - 8]
push edx
call fcn.0047d170
add esp, 8
push 0x400
lea eax, [ebp - 0x410]
push eax
push 0x4b2904
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x419976
mov byte [ebp - 0x11], 0
lea ecx, [ebp - 0x410]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.0047d170
add esp, 8
push 0x4b2920
mov eax, dword [ebp - 8]
push eax
call fcn.0047d170
add esp, 8
push 0x400
lea ecx, [ebp - 0x410]
push ecx
push 0x4b2924
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x4199f1
mov byte [ebp - 0x11], 0
lea edx, [ebp - 0x410]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.0047d170
add esp, 8
push 0x4b2930
mov ecx, dword [ebp - 8]
push ecx
call fcn.0047d170
add esp, 8
push 0x4b2934
lea edx, [ebp - 0x410]
push edx
call fcn.0047d170
add esp, 8
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.0047d170
add esp, 8
push 0x4b2940
mov edx, dword [ebp - 8]
push edx
call fcn.0047d170
add esp, 8
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x420]
mov ecx, dword [ecx + 4]
call fcn.0041a7f0
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
je 0x419a18
mov edx, dword [ebp - 8]
push edx
call fcn.0047d669
add esp, 4
mov dword [ebp - 8], 0
cmp dword [ebp - 4], 0
jne 0x419a50
push 0
push 0
push 0
push 0x4b2944
mov eax, dword [ebp - 0x420]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x420]
call dword [edx + 0x10]
push 0x45a
call dword [sym.imp.kernel32.dll_SetLastError]
xor eax, eax
jmp 0x419a8b
mov eax, dword [ebp - 0x420]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x420]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x420]
mov ecx, dword [ecx + 4]
call fcn.0041ad00
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x419a88
mov edx, dword [ebp - 0x420]
mov dword [edx + 0x10], 1
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
call fcn.0047bda9
mov esp, ebp
pop ebp
ret