Function at 0x404f90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x589ce0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5ef60c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
call fcn.0045e972
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404fd9
push 0x80004005
call fcn.00401fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
call fcn.0045e972
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405006
push 0x80004005
call fcn.00401fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 2
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x40503d
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00401de0
mov esi, dword [ebp - 0x14]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.005581e8
add esp, 8
test eax, eax
jl 0x405367
cmp eax, dword [esi - 8]
jg 0x405367
xor ecx, ecx
mov dword [esi - 0xc], eax
lea edx, [ebp - 0x10]
mov word [esi + eax*2], cx
push edx
lea ecx, [ebp - 0x14]
call fcn.0040ec20
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4050a2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx - 0xc]
lea eax, [ecx - 1]
test eax, eax
jl 0x405367
cmp eax, ecx
jg 0x405367
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x4050d4
push 1
push 0x5b93a4
lea ecx, [ebp - 0x10]
call fcn.00403ed0
push 6
push str.EPSON_
lea ecx, [ebp - 0x10]
call fcn.00403ed0
call fcn.0045e972
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4050fd
push 0x80004005
call fcn.00401fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ebx, 3
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x10]
push ecx
lea edx, [ebp - 0x14]
push str._sDownNaviLog.dat
push edx
call fcn.00402810
mov esi, dword [ebp - 0x14]
add esp, 8
add esi, 0xfffffff0
mov dword [ebp - 0x18], esp
mov edi, esp
push esi
call fcn.00401ff0
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 4
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov edi, esp
push eax
call fcn.00401ff0
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [ebp - 4], 5
call fcn.00467a9c
mov eax, dword [eax + 4]
lea ecx, [eax + 0x13c]
mov byte [ebp - 4], bl
call fcn.0041d220
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x5b9b70
call fcn.00401a30
push ecx
mov byte [ebp - 4], 6
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.RegionInfo
call fcn.00401a30
push ecx
mov byte [ebp - 4], 7
mov dword [ebp - 0x24], esp
mov edi, esp
push esi
call fcn.00401ff0
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x18]
add esp, 4
push eax
mov byte [ebp - 4], bl
call fcn.0040fc90
add esp, 0x10
mov byte [ebp - 4], 8
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00401f40
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4051f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Region
call fcn.00401a30
push ecx
mov byte [ebp - 4], 9
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.RegionInfo
call fcn.00401a30
push ecx
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x1c], esp
mov edi, esp
push esi
call fcn.00401ff0
add eax, 0x10
lea ecx, [ebp + 0xc]
add esp, 4
mov dword [edi], eax
push ecx
mov byte [ebp - 4], bl
call fcn.0040fc90
add esp, 0x10
mov edi, dword [ebp + 0x10]
push eax
mov ecx, edi
mov byte [ebp - 4], 0xb
call fcn.00401f40
mov byte [ebp - 4], bl
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40526c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
push 0x5b9ba0
push eax
call fcn.00558f06
add esp, 8
test eax, eax
jne 0x40529a
mov ecx, dword [ebp + 0x14]
push ebx
push 0x5b9b30
mov dword [0x5f834c], 1
call fcn.00401e90
jmp 0x4052ed
mov eax, dword [edi]
push 0x5b9ba4
push eax
call fcn.00558f06
add esp, 8
test eax, eax
jne 0x4052bf
mov dword [0x5f834c], 2
push str.WorldWide
jmp 0x4052e5
mov edi, dword [edi]
push 0x5b9ba8
push edi
call fcn.00558f06
add esp, 8
test eax, eax
jne 0x4052e0
mov dword [0x5f834c], ebx
push str.Japan
jmp 0x4052e5
push 0x5b95a8
mov ecx, dword [ebp + 0x14]
call fcn.004019e0
mov byte [ebp - 4], 1
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40530a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40532d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405353
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x80070057
call fcn.00401fd0
int3