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

Disassembly:
push 0x264
mov eax, 0x4526b5
call fcn.00414391
mov edi, ecx
mov dword [ebp - 0x254], edi
mov eax, dword [ebp + 8]
xor esi, esi
push esi
mov dword [ebp - 0x250], eax
mov dword [ebp - 4], esi
call dword [sym.imp.ole32.dll_OleInitialize]
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
push 0x60
cdq
pop ecx
idiv ecx
mov byte [ebp - 4], 1
test eax, eax
je 0x40fca2
mov ecx, edi
call fcn.0040e9bd
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x25c], ebx
setne byte [ebp - 0x260]
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 2
call fcn.0040e25a
push dword [ebp - 0x250]
lea ecx, [eax + 0xc]
call fcn.00401abb
lea ecx, [ebp - 0x260]
call fcn.0040e25a
cmp word [edi + 2], si
sete cl
mov edx, dword [eax]
movzx ecx, cl
push ecx
mov ecx, eax
call dword [edx + 0x20]
test eax, eax
jne 0x40fab8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp - 0x260], 0
mov esi, eax
je 0x40fca2
test ebx, ebx
je 0x40fca2
mov edx, dword [ebx]
mov ecx, ebx
push 1
call dword [edx]
jmp 0x40fca2
lea ecx, [ebp - 0x260]
call fcn.0040e25a
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 8]
test eax, eax
jns 0x40faed
cmp byte [ebp - 0x260], 0
je 0x40fae3
test ebx, ebx
je 0x40fae3
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
mov esi, 0x80004005
jmp 0x40fca2
mov eax, dword [edi + 8]
cmp eax, 1
mov edi, dword [edi + 0xc]
mov dword [ebp - 0x264], eax
sete al
mov byte [ebp - 0x268], al
mov eax, dword [ebp - 0x254]
cmp edi, dword [eax + 0x10]
je 0x40fd96
push edi
mov ecx, eax
call fcn.0040ea52
mov ecx, 0x8664
cmp cx, ax
jne 0x40fb56
mov ecx, dword [ebp - 0x254]
push esi
call fcn.0040f4c7
cmp byte [ebp - 0x260], 0
mov esi, eax
je 0x40fca2
test ebx, ebx
je 0x40fca2
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
jmp 0x40fca2
cmp dword [ebp - 0x264], 1
jne 0x40fb8e
lea ecx, [ebp - 0x260]
call fcn.0040e25a
mov ecx, dword [ebp - 0x254]
mov edx, dword [eax]
cmp word [ecx + 2], si
sete cl
movzx ecx, cl
push ecx
mov ecx, eax
call dword [edx + 0x20]
test eax, eax
jne 0x40fb8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40fb32
lea eax, [edi + 4]
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x258], eax
jb 0x40fb9f
mov eax, dword [eax]
push 8
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
mov dword [ebp - 0x250], esi
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x40fc55
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor eax, eax
mov ecx, edi
push eax
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.00404816
add eax, 4
cmp dword [eax + 0x14], 8
jb 0x40fbf2
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x24c]
call fcn.00401a1b
mov eax, dword [ebp - 0x258]
cmp dword [eax + 0x14], 8
jb 0x40fc12
mov eax, dword [eax]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x258], eax
test eax, eax
je 0x40fc3e
lea ecx, [ebp - 0x250]
call fcn.00407e59
mov esi, dword [ebp - 0x258]
mov dword [ebp - 0x250], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
je 0x40fc7d
mov eax, dword [ebp - 0x254]
cmp dword [eax + 8], 2
je 0x40fcc2
push esi
mov ecx, eax
call fcn.0040efc5
test al, al
je 0x40fcc2
push str.DllGetClassObject
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40fcaf
lea ecx, [ebp - 0x250]
call fcn.00407e59
cmp byte [ebp - 0x260], 0
je 0x40fc9d
test ebx, ebx
je 0x40fc9d
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
mov esi, 0x80004004
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, esi
jmp 0x40fdc7
lea ecx, [ebp - 0x26c]
push ecx
push 0x45498c
push 0x457ba4
call eax
lea ecx, [ebp - 0x260]
call fcn.0040e25a
push dword [ebp - 0x268]
mov ecx, eax
push esi
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [ebp - 0x254]
cmp dword [eax + 8], 1
je 0x40fd12
push str.DllUnregisterServer
lea ecx, [ebp - 0x250]
push ecx
mov ecx, eax
call fcn.0040e72a
lea ecx, [ebp - 0x260]
call fcn.0040e25a
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
mov eax, dword [ebp - 0x254]
push str.DllRegisterServer
lea ecx, [ebp - 0x250]
push ecx
mov ecx, eax
call fcn.0040e72a
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x258], eax
call fcn.0040e25a
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x18]
push esi
call fcn.00412cc1
xor esi, esi
pop ecx
cmp dword [ebp - 0x258], esi
jge 0x40fd66
mov ecx, dword [ebp - 0x254]
lea eax, [ebp - 0x258]
push eax
push esi
lea eax, [edi + 0x30]
push eax
push edi
call fcn.0040e7c3
mov ecx, dword [ebp - 0x254]
lea eax, [ebp - 0x258]
push eax
push 0xffffffffffffffff
lea eax, [edi + 0x30]
push eax
push edi
call fcn.0040e7c3
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 2
call fcn.00407e59
add edi, 0x60
jmp 0x40fb05
cmp byte [ebp - 0x260], 0
mov byte [0x464d54], 1
je 0x40fdb2
test ebx, ebx
je 0x40fdb2
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
call dword [sym.imp.ole32.dll_OleUninitialize]
xor eax, eax
jmp 0x40fdc7
call fcn.004142de
ret 4