Function at 0x4cf4e0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x22c
mov eax, dword [0x6b66bc]
xor eax, esp
mov dword [esp + 0x228], eax
push ebp
mov ebp, dword [esp + 0x234]
lea eax, [esp + 4]
push eax
call fcn.004ccb20
push eax
push ebp
call fcn.004cef50
mov eax, dword [esp + 0x10]
add esp, 0xc
test eax, eax
je 0x4cf521
push eax
call fcn.0043f8f0
add esp, 4
cmp dword [ebp + 4], 1
jg 0x4cf761
push 0x208
lea eax, [esp + 0x28]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x24]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4cf761
push esi
xor edx, edx
mov dword [esp + 8], 0
push edi
xor edi, edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edi
cmp word [esp + 0x2c], dx
je 0x4cf5d6
lea ecx, [esp + 0x2c]
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cf584
sub ecx, esi
sar ecx, 1
lea esi, [ecx + 1]
test esi, esi
jle 0x4cf5ac
push esi
lea ecx, [esp + 0x10]
call fcn.0040ce40
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea eax, [edx + esi]
mov dword [esp + 0x10], eax
cmp eax, edi
jle 0x4cf5c1
push edx
lea ecx, [esp + 0x10]
call fcn.0040cde0
lea eax, [esi + esi]
push eax
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x14]
call fcn.004263f0
add esp, 0xc
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004a5cb0
add esp, 8
mov ecx, ebp
push eax
call fcn.00417730
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4cf601
push eax
call fcn.0043f8f0
add esp, 4
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4cf612
push eax
call fcn.0043f8f0
add esp, 4
push ebx
push 1
push 0x62e768
mov ecx, ebp
call fcn.0040ed60
xor edi, edi
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x10], edi
mov ecx, 0x80
mov dword [esp + 0x18], ebx
cmp ecx, esi
jle 0x4cf650
mov eax, esi
mov esi, ecx
mov dword [esp + 0x14], esi
cmp ecx, ebx
jle 0x4cf68f
push eax
lea ecx, [esp + 0x14]
call fcn.0040cde0
jmp 0x4cf683
jge 0x4cf68f
mov edx, esi
sub edx, ecx
je 0x4cf68f
sub esi, edx
mov eax, esi
sub eax, ecx
je 0x4cf676
add eax, eax
push eax
lea eax, [edx + ecx]
lea eax, [edi + eax*2]
push eax
lea eax, [edi + ecx*2]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], esi
call fcn.00412d40
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, eax
test ecx, ecx
je 0x4cf70a
cmp ecx, esi
jae 0x4cf636
inc ecx
cmp ecx, esi
jle 0x4cf6eb
mov eax, ecx
mov edx, esi
sub eax, esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], eax
mov esi, ecx
mov dword [esp + 0x14], esi
cmp ecx, ebx
jle 0x4cf6d8
push edx
lea ecx, [esp + 0x14]
call fcn.0040cde0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add eax, eax
push eax
lea eax, [edi + edx*2]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x4cf731
jge 0x4cf731
mov eax, esi
sub eax, ecx
je 0x4cf731
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x10]
call fcn.00412d40
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
jmp 0x4cf731
xor esi, esi
test ebx, ebx
jns 0x4cf728
mov dword [esp + 0x14], esi
je 0x4cf728
push esi
lea ecx, [esp + 0x14]
call fcn.0040ce40
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4cf731
xor eax, eax
mov word [edi], ax
pop ebx
test esi, esi
je 0x4cf739
dec esi
jmp 0x4cf73b
xor esi, esi
push esi
push edi
mov ecx, ebp
call fcn.0040edd0
test edi, edi
je 0x4cf751
push edi
call fcn.0043f8f0
add esp, 4
push 1
push 0x62e768
mov ecx, ebp
call fcn.0040ed60
pop edi
pop esi
mov ecx, dword [esp + 0x22c]
mov eax, ebp
pop ebp
xor ecx, esp
call fcn.005f4480
add esp, 0x22c
ret