Function at 0x40652a
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x42021e
call fcn.00412d4c
sub esp, 0x474
push esi
mov esi, dword [esp + 0x48c]
test esi, esi
jne 0x40654d
xor eax, eax
jmp 0x4066d4
push ebx
mov ebx, dword [esi + 0x3c]
add ebx, esi
cmp dword [ebx + 0x7c], 0
jne 0x406560
xor eax, eax
jmp 0x4066d3
push ebp
push edi
call fcn.0040639e
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, 3
jae 0x40658c
push str.Local506
push 0
push 0
push 0
call ebp
test eax, eax
je 0x40658c
push eax
call edi
call fcn.0040639e
cmp eax, 3
jae 0x4065aa
push str.Local507
push 1
push 1
push 0
call ebp
test eax, eax
je 0x4065aa
push eax
call edi
mov ebp, dword [ebx + 0x78]
add ebp, esi
mov dword [esp + 0x24], ebp
mov eax, dword [ebp + 0x1c]
add eax, esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x24]
add eax, esi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x20]
add eax, esi
mov dword [esp + 0x20], eax
call fcn.0040639e
cmp eax, 3
jae 0x4065ee
push str.293293
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test eax, eax
je 0x4065ee
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, dword [esp + 0x49c]
cmp byte [edi], 0xff
je 0x406671
call fcn.0040639e
cmp eax, 3
jae 0x406621
push str.Global999
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
je 0x406621
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 7
push edi
push str._:hash:
call fcn.00414f88
add esp, 0xc
test eax, eax
je 0x40665e
push 7
push edi
push str._:text:
call fcn.00414f88
add esp, 0xc
test eax, eax
je 0x40665e
push 0
push edi
call fcn.004124c0
pop ecx
push eax
push edi
call fcn.004079ea
add esp, 0xc
jmp 0x406674
push 0
push edi
call fcn.004124c0
pop ecx
sub eax, 7
push eax
lea eax, [edi + 7]
push eax
jmp 0x406654
mov eax, dword [edi + 1]
xor edi, edi
mov dword [esp + 0x14], eax
cmp dword [ebp + 0x18], edi
jbe 0x4066cf
mov eax, dword [esp + 0x20]
mov ebp, dword [eax + edi*4]
call fcn.0040639e
cmp eax, 3
jae 0x4066a6
push str.854854
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test eax, eax
je 0x4066a6
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test ebp, ebp
je 0x4066c5
add ebp, esi
push 0
push ebp
call fcn.004124c0
pop ecx
push eax
push ebp
call fcn.004079ea
add esp, 0xc
cmp dword [esp + 0x14], eax
je 0x4066e5
mov eax, dword [esp + 0x24]
inc edi
cmp edi, dword [eax + 0x18]
jb 0x40667f
xor eax, eax
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x478]
pop esi
mov dword fs:[0], ecx
leave
ret
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + edi*2]
mov edi, dword [esp + 0x18]
mov edi, dword [edi + eax*4]
cmp edi, dword [ebx + 0x78]
jb 0x40681e
mov eax, dword [ebx + 0x7c]
add eax, dword [ebx + 0x78]
cmp edi, eax
jae 0x40681e
call fcn.0040639e
cmp eax, 3
jae 0x406725
lea eax, [esp + 0x70]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [edi + esi]
push eax
lea ecx, [esp + 0x2c]
call fcn.00401391
xor ebx, ebx
mov dword [esp + 0x48c], ebx
push 1
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x1c], 0x2e
call fcn.00405283
mov esi, eax
or ebp, 0xffffffff
cmp esi, ebp
je 0x406809
push esi
push ebx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x34]
call fcn.004063bc
mov byte [esp + 0x48c], 1
cmp dword [eax + 0x14], 0x10
jb 0x40677e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
mov byte [esp + 0x48c], bl
lea ecx, [esp + 0x58]
call fcn.004015cc
call fcn.0040639e
cmp eax, 3
jae 0x4067b0
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
test edi, edi
je 0x406809
push ebp
lea eax, [esi + 1]
push eax
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x34]
call fcn.004063bc
mov byte [esp + 0x48c], 2
cmp dword [eax + 0x14], 0x10
jb 0x4067d7
mov eax, dword [eax]
push eax
push edi
call fcn.0040652a
pop ecx
pop ecx
mov esi, eax
mov byte [esp + 0x48c], bl
lea ecx, [esp + 0x40]
call fcn.004015cc
mov dword [esp + 0x48c], ebp
lea ecx, [esp + 0x28]
call fcn.004015cc
mov eax, esi
jmp 0x4066d1
mov dword [esp + 0x48c], ebp
lea ecx, [esp + 0x28]
call fcn.004015cc
jmp 0x4066cf
lea eax, [edi + esi]
jmp 0x4066d1