Function at 0x40bd8a
Capabilities:
Get common file path

Disassembly:
mov eax, 0x41ef46
call fcn.00414f0c
sub esp, 0x424
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov esi, ecx
je 0x40be61
cmp dword [esi + 0x20], ebx
je 0x40be61
push ebx
push dword [ebp + 8]
call fcn.0040c100
test al, al
jne 0x40be61
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x20], al
call fcn.0040389d
push dword [ebp + 0xc]
call fcn.00415945
pop ecx
push eax
lea ecx, [ebp - 0x20]
push dword [ebp + 0xc]
call fcn.0040396c
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
jne 0x40be91
mov edx, 0x81
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x226]
mov word [ebp - 0x228], bx
mov word [ebp - 0x430], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x42e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x430]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x228]
push eax
push ebx
lea eax, [ebp - 0x430]
push 0x426854
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x40be74
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x20]
call fcn.0040389d
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14
lea eax, [ebp - 0x228]
push eax
call fcn.00415945
pop ecx
push eax
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040396c
push 0x38
call fcn.00414b28
pop ecx
mov dword [ebp + 0xc], eax
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x40bead
mov ecx, eax
call fcn.0040b839
jmp 0x40beaf
xor eax, eax
and byte [ebp - 4], 0
mov ecx, esi
mov dword [ebp - 0x10], eax
call fcn.0040b7b4
mov ecx, dword [ebp - 0x10]
push dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
lea edi, [eax + 4]
call fcn.00415945
pop ecx
push eax
mov ecx, edi
push dword [ebp + 8]
call fcn.0040396c
mov eax, dword [ebp - 0x10]
push dword [0x420340]
lea ecx, [eax + 0x14]
lea eax, [ebp - 0x20]
push ebx
push eax
call fcn.004037bf
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x14]
lea edx, [ebp - 0x10]
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x18]
push edx
mov dword [ecx + 0x30], eax
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0x24]
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.00409259
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x40bf24
mov eax, 0x42034c
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push eax
call edi
mov dword [ebp + 0xc], eax
push dword [ebp + 8]
mov byte [ebp - 4], 2
call edi
mov dword [ebp + 8], eax
push ebx
push ebx
push dword [ebp + 0x10]
mov eax, dword [esi + 0x20]
mov byte [ebp - 4], 3
push dword [ebp + 0xc]
mov ecx, dword [eax]
push dword [esi + 4]
push dword [ebp + 8]
push eax
call dword [ecx + 4]
push dword [ebp + 8]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov bl, al
mov byte [ebp - 4], 2
neg bl
sbb bl, bl
inc bl
call edi
push dword [ebp + 0xc]
and byte [ebp - 4], 0
call edi
test bl, bl
je 0x40bf86
mov dword [esi + 0x34], 4
xor esi, esi
jmp 0x40bf92
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x34], 1
mov esi, dword [eax]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x20]
call fcn.0040389d
mov eax, esi
jmp 0x40be63