Function at 0x456910
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59b643
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x60f520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
je 0x456bd7
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x456bd4
mov eax, dword [ebp - 0x34]
and eax, 0xfffffe07
mov dword [ebp - 0x30], 0
or eax, 7
push 8
mov dword [ebp - 0x34], eax
call fcn.00551c81
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x4569a5
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004e7880
mov dword [esi], eax
jmp 0x4569a7
xor esi, esi
mov dword [ebp - 0x3c], esi
push ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x70]
push dword [ebp + 8]
call fcn.00517270
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x70]
call fcn.00517560
test eax, eax
jne 0x4569f4
lea ecx, [ebp - 0x70]
call fcn.0045db80
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0
call fcn.004e6420
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
jmp 0x456be1
mov ecx, ebx
call fcn.004562d0
lea ecx, [ebx + 0x40]
call fcn.00450900
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x34]
test al, al
je 0x456a38
cmp al, 7
je 0x456a38
lea ecx, [ebp - 0x70]
call fcn.0045db80
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0
call fcn.004e6420
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
jmp 0x456be1
push ecx
push str.RoadInfo
lea ecx, [ebp - 0x3c]
call fcn.004e6b80
push eax
lea ecx, [ebp - 0x5c]
call fcn.004e62d0
mov byte [ebp - 4], 5
mov al, byte [ebp - 0x54]
test al, al
je 0x456a5e
cmp al, 7
jne 0x456a69
lea edx, [ebx + 0x40]
lea ecx, [ebp - 0x5c]
call fcn.0050c9f0
push ecx
push str.CategoryInfoList
lea ecx, [ebp - 0x3c]
call fcn.004e6b80
push eax
lea ecx, [ebp - 0x4c]
call fcn.004e62d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4c]
mov al, byte [ebp - 0x44]
test al, al
je 0x456a92
cmp al, 6
jne 0x456b0c
xor edi, edi
call fcn.004e6880
cmp edi, eax
jae 0x456b0c
push edi
lea ecx, [ebp - 0x4c]
call fcn.004e68f0
mov ebx, eax
mov al, byte [ebx + 8]
test al, al
je 0x456ab3
cmp al, 7
jne 0x456b03
push 0x110
call fcn.00551c81
add esp, 4
test eax, eax
je 0x456acf
mov ecx, eax
call fcn.00450590
mov esi, eax
jmp 0x456ad1
xor esi, esi
mov edx, esi
mov dword [ebp - 0x1c], esi
mov ecx, ebx
call fcn.0050c9f0
test eax, eax
je 0x456af6
mov ebx, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebx + 0x34]
call fcn.00409bc0
inc edi
lea ecx, [ebp - 0x4c]
jmp 0x456a94
test esi, esi
je 0x456b03
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 8]
mov ebx, dword [ebp - 0x18]
lea ecx, [ebp - 0x4c]
inc edi
jmp 0x456a94
push ecx
push str.MagicItemVersion
lea ecx, [ebp - 0x3c]
call fcn.004e6b80
lea edx, [ebx + 0x35c]
mov ecx, eax
call fcn.0050c830
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 5
call fcn.004e6420
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 4
call fcn.004e6420
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x70]
mov dword [ebx + 0x358], 1
call fcn.0045db80
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0
call fcn.004e6420
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x456b88
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x456bf8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, 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 4