Function at 0x405810
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.00409990
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 0x1ff
lea edx, [ebp - 0x60c]
push edx
call fcn.00405ee9
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 0x40586b
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, pe_nt_image_headers32
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 0x4058d1
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.00406db7
add esp, 4
mov dword [ebp - 0xe24], eax
push 0x10000
push 0
mov ecx, dword [ebp - 0xe24]
push ecx
call fcn.00409990
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.00409990
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.00409990
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x4059d9
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x405a01
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00405b60
add esp, 4
push 0x418da0
push 0x103
lea edx, [ebp - 0x20c]
push edx
call fcn.00405f45
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.00404b70
add esp, 0x10
test eax, eax
jne 0x405a2e
jmp 0x405b1c
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.00404d50
add esp, 0x14
test eax, eax
jne 0x405a68
jmp 0x405b1c
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.00405140
add esp, 0x14
test eax, eax
jne 0x405a9e
jmp 0x405b1c
movzx edx, word [ebp - 0xe14]
movzx eax, word [ebp - 0xe28]
cmp edx, eax
jne 0x405ab9
cmp dword [ebp - 0xe18], 0
jne 0x405abd
jmp 0x405b1c
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 0x405ae3
jmp 0x405b1c
push 0x41c1a0
push 0x104
lea edx, [ebp - 0x20c]
push edx
call fcn.00405f45
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0xe10]
push ecx
call fcn.00405be0
add esp, 8
mov dword [ebp - 0xe34], 1
cmp dword [ebp - 0xe24], 0
je 0x405b34
mov edx, dword [ebp - 0xe24]
push edx
call fcn.00406e49
add esp, 4
lea eax, [ebp - 0xe10]
push eax
call fcn.00404d20
add esp, 4
mov eax, dword [ebp - 0xe34]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405da4
mov esp, ebp
pop ebp
ret