Function at 0x40cb86
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x4177fc
call fcn.0040ef50
sub esp, 0x298
push ebx
push esi
push edi
mov esi, ecx
push str.CMainFrame::DeleteRegEBAPILocal___n
call fcn.004024eb
pop ecx
lea eax, [ebp - 0x164]
push 1
pop edi
push 0x104
push eax
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x2a4]
push eax
push str.epbidapi.dll
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40cbf0
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
jmp 0x40cee8
mov ecx, esi
call fcn.0040479e
test eax, eax
je 0x40cee8
push ecx
lea edi, [esi + 0x84]
mov ecx, esp
mov dword [ebp - 0x20], esp
push edi
call fcn.004013ef
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.0040cf05
xor ebx, ebx
lea ecx, [esi + 0x98]
push eax
mov dword [ebp - 4], ebx
call fcn.00401618
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00401563
lea ecx, [esi + 0x98]
call fcn.00401b7a
test eax, eax
je 0x40cc5e
mov dword [esi + 0x70], 3
mov dword [esi + 0x74], 0xc8
mov dword [ebp - 0x1c], ebx
jmp 0x40cee5
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.0040ab3a
push 0x41c058
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 1
push eax
call fcn.0040176a
add esp, 0xc
push edi
push eax
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 2
push eax
call fcn.004016fe
add esp, 0xc
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.00401563
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call fcn.00401563
cmp dword [esi + 0x2c], ebx
push 0x10
je 0x40cce1
call fcn.0040efd0
pop ecx
mov dword [ebp - 0x10], eax
cmp eax, ebx
mov byte [ebp - 4], 6
je 0x40cd11
push 0xf003f
push 1
push dword [esi + 0x68]
lea ecx, [ebp - 0x18]
call fcn.00401e04
mov ecx, dword [ebp - 0x10]
push eax
push 0x80000002
jmp 0x40cd0a
call fcn.0040efd0
pop ecx
mov dword [ebp - 0x10], eax
cmp eax, ebx
mov byte [ebp - 4], 7
je 0x40cd11
push 0xf003f
push ebx
push ebx
lea ecx, [ebp - 0x18]
call fcn.00401e04
mov ecx, dword [ebp - 0x10]
push eax
push 0x80000002
call fcn.0040dc20
jmp 0x40cd13
xor eax, eax
mov edi, eax
mov byte [ebp - 4], 4
cmp dword [edi + 8], ebx
jne 0x40cd34
mov dword [esi + 0x70], 3
mov dword [esi + 0x74], 0xc9
mov dword [ebp - 0x1c], ebx
jmp 0x40cecd
lea ecx, [ebp - 0x10]
call fcn.004013e3
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 8
call fcn.00402e12
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 9
call fcn.004013e3
push ecx
mov byte [ebp - 4], 0xa
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Install
call fcn.00401595
push ecx
lea eax, [esi + 0x98]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
mov byte [ebp - 4], 0xb
call fcn.004013ef
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 0xa
call fcn.00402ed2
test eax, eax
jne 0x40cda4
mov dword [esi + 0x70], 6
mov dword [esi + 0x74], 8
mov dword [ebp - 0x1c], ebx
jmp 0x40cea9
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x60]
push eax
call fcn.004030d3
test eax, eax
je 0x40cea9
mov esi, str.LPT_ReadTotalTimeOut
lea ecx, [ebp - 0x10]
call fcn.004014c2
lea eax, [ebp - 0x14]
push str.LPT_ReadTotalTimeOut_NT40
push eax
call fcn.00401e2f
pop ecx
test al, al
pop ecx
jne 0x40cef7
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.00401e2f
pop ecx
test al, al
pop ecx
jne 0x40cef7
lea eax, [ebp - 0x14]
push str.SETLPT
push eax
call fcn.00401e2f
pop ecx
test al, al
pop ecx
je 0x40ce3a
push ecx
lea eax, [ebp - 0x58]
mov ecx, esp
mov dword [ebp - 0x30], esp
push eax
call fcn.004013ef
lea eax, [ebp - 0x24]
push eax
call fcn.0040317c
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xc
call fcn.00401618
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xa
call fcn.00401563
jmp 0x40ce79
lea eax, [ebp - 0x20]
push 4
push eax
lea ecx, [ebp - 0x14]
call fcn.00401c38
push str.LPT_
push eax
mov byte [ebp - 4], 0xd
call fcn.00401e2f
pop ecx
mov bl, al
pop ecx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x20]
call fcn.00401563
test bl, bl
je 0x40ce77
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x10]
push eax
call fcn.00401618
xor ebx, ebx
lea ecx, [ebp - 0x10]
call fcn.00401b7a
test eax, eax
jne 0x40ce95
lea ecx, [ebp - 0x10]
call fcn.00401e04
push eax
mov ecx, edi
call fcn.0040df79
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x60]
push eax
call fcn.004030d3
test eax, eax
jne 0x40cdbd
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 9
call fcn.00401563
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 8
call fcn.00402e86
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00401563
cmp edi, ebx
je 0x40ced9
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00401563
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
push esi
lea ecx, [ebp - 0x10]
call fcn.00401680
jmp 0x40ce79