Function at 0x4058a0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4c
mov eax, dword [0x41a038]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x400
push 0
lea eax, [ebp - 0x60c]
push eax
call fcn.00409a20
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 0x1ff
lea edx, [ebp - 0x60c]
push edx
call fcn.00405f79
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0xe20], eax
mov ecx, dword [ebp - 0xe20]
add ecx, 2
mov dword [ebp - 0xe3c], ecx
mov edx, dword [ebp - 0xe20]
mov ax, word [edx]
mov word [ebp - 0xe30], ax
add dword [ebp - 0xe20], 2
cmp word [ebp - 0xe30], 0
jne 0x4058fb
mov ecx, dword [ebp - 0xe20]
sub ecx, dword [ebp - 0xe3c]
sar ecx, 1
mov dword [ebp - 0xe38], ecx
mov edx, dword [ebp - 0xe38]
lea edi, [ebp + edx*2 - 0x60a]
mov ecx, 0x80
mov esi, 0x41c920
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 8]
mov dword [ebp - 0xe2c], eax
mov ecx, dword [ebp - 0xe2c]
add ecx, 2
mov dword [ebp - 0xe44], ecx
mov edx, dword [ebp - 0xe2c]
mov ax, word [edx]
mov word [ebp - 0xe2e], ax
add dword [ebp - 0xe2c], 2
cmp word [ebp - 0xe2e], 0
jne 0x405961
mov ecx, dword [ebp - 0xe2c]
sub ecx, dword [ebp - 0xe44]
sar ecx, 1
mov dword [ebp - 0xe48], ecx
mov edx, dword [ebp - 0xe48]
lea eax, [edx + edx + 0x202]
mov dword [ebp - 0xe40], eax
push 0x10000
call fcn.00406e47
add esp, 4
mov dword [ebp - 0xe24], eax
push 0x10000
push 0
mov ecx, dword [ebp - 0xe24]
push ecx
call fcn.00409a20
add esp, 0xc
mov dword [ebp - 0xe18], 0x10000
mov edx, 0xbba
mov word [ebp - 0xe28], dx
xor eax, eax
mov word [ebp - 0xe0c], ax
push 0x7fe
push 0
lea ecx, [ebp - 0xe0a]
push ecx
call fcn.00409a20
add esp, 0xc
lea edx, [ebp - 0xe0c]
mov dword [ebp - 0xe4c], edx
mov dword [ebp - 0xe10], 0
mov dword [ebp - 0xe34], 0
xor eax, eax
mov word [ebp - 0xe14], ax
xor ecx, ecx
mov word [ebp - 0x20c], cx
push 0x206
push 0
lea edx, [ebp - 0x20a]
push edx
call fcn.00409a20
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x405a69
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x405a91
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00405bf0
add esp, 4
push 0x418ddc
push 0x103
lea edx, [ebp - 0x20c]
push edx
call fcn.00405fd5
add esp, 0xc
lea eax, [ebp - 0xe0c]
push eax
lea ecx, [ebp - 0xe10]
push ecx
movzx edx, word [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404c00
add esp, 0x10
test eax, eax
jne 0x405abe
jmp 0x405bac
lea ecx, [ebp - 0xe0c]
push ecx
mov edx, dword [ebp - 0xe40]
push edx
lea eax, [ebp - 0x60c]
push eax
movzx ecx, word [ebp - 0xe28]
push ecx
lea edx, [ebp - 0xe10]
push edx
call fcn.00404de0
add esp, 0x14
test eax, eax
jne 0x405af8
jmp 0x405bac
lea eax, [ebp - 0xe0c]
push eax
lea ecx, [ebp - 0xe18]
push ecx
mov edx, dword [ebp - 0xe24]
push edx
lea eax, [ebp - 0xe14]
push eax
lea ecx, [ebp - 0xe10]
push ecx
call fcn.004051d0
add esp, 0x14
test eax, eax
jne 0x405b2e
jmp 0x405bac
movzx edx, word [ebp - 0xe14]
movzx eax, word [ebp - 0xe28]
cmp edx, eax
jne 0x405b49
cmp dword [ebp - 0xe18], 0
jne 0x405b4d
jmp 0x405bac
mov ecx, 1
imul ecx, ecx, 0
mov edx, dword [ebp - 0xe24]
mov al, byte [edx + ecx]
mov byte [ebp - 0xe19], al
movzx ecx, byte [ebp - 0xe19]
test ecx, ecx
je 0x405b73
jmp 0x405bac
push 0x41c1a0
push 0x104
lea edx, [ebp - 0x20c]
push edx
call fcn.00405fd5
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0xe10]
push ecx
call fcn.00405c70
add esp, 8
mov dword [ebp - 0xe34], 1
cmp dword [ebp - 0xe24], 0
je 0x405bc4
mov edx, dword [ebp - 0xe24]
push edx
call fcn.00406ed9
add esp, 4
lea eax, [ebp - 0xe10]
push eax
call fcn.00404db0
add esp, 4
mov eax, dword [ebp - 0xe34]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405e34
mov esp, ebp
pop ebp
ret