Function at 0x404360
Capabilities:
Get common file path

Disassembly:
sub esp, 0x898
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x894], eax
push ebx
xor eax, eax
push ebp
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x10], 4
xor esi, esi
lea esp, [esp]
mov eax, dword [0x4086b4]
push 0x208
push 8
push eax
call edi
mov dword [esp + esi*4 + 0x14], eax
add esi, 1
cmp esi, 6
jle 0x4043b0
mov esi, dword [esp + 0x14]
push 0x102
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, dword [esp + 0x18]
mov ebp, dword [sym.imp.MSVCR80.dll_wcscpy_s]
push esi
push 0x102
push edi
mov word [esi + 6], bx
call ebp
mov ecx, dword [0x408684]
mov ebx, dword [sym.imp.MSVCR80.dll_wcscat_s]
push ecx
push 0x102
push esi
call ebx
mov edx, dword [0x408680]
push edx
push 0x102
push edi
call ebx
mov eax, dword [0x408688]
mov ebx, dword [esp + 0x40]
push eax
push 0x102
push ebx
call ebp
mov ebp, dword [esp + 0x5c]
add esp, 0x30
push 0x102
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebp
push esi
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x404453
mov word [esi], ax
mov dword [esp + 0x10], eax
push ebp
push edi
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x40446d
mov word [edi], ax
mov dword [esp + 0x10], 1
push ebp
push ebx
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x404487
mov word [ebx], ax
mov dword [esp + 0x10], 2
mov ebp, dword [esp + 0x20]
push ebp
mov eax, esi
call fcn.00404080
mov ecx, dword [esp + 0x28]
push ecx
mov eax, edi
call fcn.00404080
mov edi, dword [esp + 0x30]
push edi
mov eax, ebx
call fcn.00404080
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
add esp, 0xc
push ebp
push 0
push 0
call esi
mov edx, dword [esp + 0x24]
push edx
push 0
push 0
mov dword [esp + 0x40], eax
call esi
push edi
push 0
push 0
mov dword [esp + 0x44], eax
call esi
xor esi, esi
mov dword [esp + 0x3c], eax
lea edi, [esp + 0x58]
or ebx, 0xffffffff
mov ecx, dword [esp + esi*4 + 0x14]
mov eax, dword [esp + esi*4 + 0x34]
push ecx
push 0x102
push edi
mov dword [edi - 4], eax
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
mov dword [edi + 0x208], esi
mov dword [edi + 0x20c], ebx
add esi, 1
add esp, 0xc
add edi, 0x214
cmp esi, 2
jle 0x4044e2
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, dword [sym.imp.KERNEL32.dll_ResumeThread]
xor esi, esi
lea edi, [esp + 0x54]
lea esp, [esp]
cmp dword [esi*4 + 0x408018], 1
jne 0x404561
cmp dword [esp + 0x10], esi
je 0x404561
lea edx, [esp + esi*4 + 0x44]
push edx
push 4
push edi
push 0x404310
push 0
push 0
mov dword [esi*4 + 0x408018], 0
call ebx
push eax
call ebp
add esi, 1
add edi, 0x214
cmp esi, 2
jle 0x404530
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
jmp 0x404580
mov eax, dword [esp + esi*4 + 0x14]
mov ecx, dword [0x4086b4]
push eax
push 0
push ecx
call edi
add esi, 1
cmp esi, 6
jle 0x404580
mov ecx, dword [esp + 0x8a4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405260
add esp, 0x898
ret