Function at 0x405570
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x521709
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb18
mov eax, dword [0x57dcc0]
xor eax, ebp
mov dword [ebp - 0x28], eax
mov dword [ebp - 0xb14], ecx
lea ecx, [ebp - 0x24]
call fcn.004221eb
mov dword [ebp - 4], 0
mov dword [ebp - 0x444], 1
mov dword [ebp - 0x440], 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xb14]
call fcn.004054f0
test eax, eax
jne 0x4056c6
lea ecx, [ebp - 0x44c]
call fcn.00402a80
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x448]
call fcn.00402a80
mov byte [ebp - 4], 2
push 0x91
lea ecx, [ebp - 0x44c]
call fcn.00402cb0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
lea ecx, [ebp - 0x44c]
call fcn.00418360
push eax
lea eax, [ebp - 0x448]
push eax
call fcn.004046f0
add esp, 0xc
push 0
push 4
lea ecx, [ebp - 0x448]
call fcn.00418360
push eax
call fcn.0050ac4f
cmp eax, 7
jne 0x405684
mov dword [ebp - 0xac0], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x448]
call fcn.00402b10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44c]
call fcn.00402b10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xac0]
jmp 0x40628e
mov dword [ebp - 0xac4], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x448]
call fcn.00402b10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44c]
call fcn.00402b10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xac4]
jmp 0x40628e
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], 0x10
jne 0x405efd
lea ecx, [ebp - 0x45c]
call fcn.00406e70
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406ad0
mov byte [ebp - 4], 4
mov dword [ebp - 0x668], 0xffffffff
mov ecx, dword [ebp + 8]
add ecx, 4
call fcn.00418360
push eax
lea edx, [ebp - 0xa7c]
push edx
call fcn.0042c01f
add esp, 8
mov ecx, dword [ebp + 8]
call fcn.00418360
push eax
lea eax, [ebp - 0xa7c]
push eax
call fcn.0042bff5
add esp, 8
lea ecx, [ebp - 0xa7c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov edx, dword [ebp - 0xb14]
add edx, 0x58
push edx
lea eax, [ebp - 0x874]
push eax
call fcn.0042c01f
add esp, 8
lea ecx, [ebp - 0x874]
push ecx
call fcn.0042c43d
add esp, 4
movzx edx, word [ebp + eax*2 - 0x876]
cmp edx, 0x5c
jne 0x405789
lea eax, [ebp - 0x874]
push eax
call fcn.0042c43d
add esp, 4
mov word [ebp + eax*2 - 0x876], 0
mov ecx, dword [ebp + 8]
add ecx, 0xc
call fcn.00418360
push eax
lea ecx, [ebp - 0xa80]
push ecx
call fcn.0040a700
add esp, 8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xa80]
call fcn.00418360
push eax
lea edx, [ebp - 0x874]
push edx
call fcn.0042bff5
add esp, 8
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00418360
push eax
lea eax, [ebp - 0x874]
push eax
call fcn.0042bff5
add esp, 8
lea ecx, [ebp - 0x874]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405803
lea edx, [ebp - 0x874]
push edx
call fcn.00409e60
add esp, 4
jmp 0x405964
mov eax, dword [ebp - 0xb14]
cmp dword [eax + 0x27c], 0
jne 0x405964
lea ecx, [ebp - 0x874]
push ecx
mov edx, dword [ebp - 0xb14]
mov ecx, dword [edx + 0x54]
call fcn.00404240
mov dword [ebp - 0xaa8], eax
mov eax, dword [ebp - 0xaa8]
mov dword [ebp - 0xb18], eax
cmp dword [ebp - 0xb18], 3
ja case.default.0x405850
mov ecx, dword [ebp - 0xb18]
jmp dword [ecx*4 + 0x4062a8]
jmp 0x405964
mov dword [ebp - 0xac8], 1
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xac8]
jmp 0x40628e
mov edx, dword [ebp - 0xb14]
mov dword [edx + 0x27c], 1
jmp 0x405964
mov dword [ebp - 0xacc], 0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xacc]
jmp 0x40628e
mov dword [ebp - 0xad0], 1
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xad0]
jmp 0x40628e
push 0
lea eax, [ebp - 0xa7c]
push eax
lea ecx, [ebp - 0x45c]
push ecx
mov edx, dword [ebp - 0xb14]
mov ecx, dword [edx + 0x278]
call fcn.00414530
lea eax, [ebp - 0xaac]
push eax
lea ecx, [ebp - 0x45c]
call fcn.00406ea0
jmp 0x4059a4
lea ecx, [ebp - 0xaac]
call fcn.00406f20
lea ecx, [ebp - 0xad4]
push ecx
lea ecx, [ebp - 0x45c]
call fcn.00406ec0
push eax
lea ecx, [ebp - 0xaac]
call fcn.00406f40
movzx edx, al
test edx, edx
je 0x405ecb
lea ecx, [ebp - 0xaac]
call fcn.00406f00
push eax
lea ecx, [ebp - 0xaa4]
call fcn.00406c80
mov ecx, dword [ebp - 0xb14]
add ecx, 0x280
call fcn.00406ab0
push eax
lea eax, [ebp - 0x664]
push eax
call fcn.0042c01f
add esp, 8
lea ecx, [ebp - 0x664]
push ecx
call fcn.0042c43d
add esp, 4
movzx edx, word [ebp + eax*2 - 0x666]
cmp edx, 0x5c
jne 0x405a3a
lea eax, [ebp - 0x664]
push eax
call fcn.0042c43d
add esp, 4
mov word [ebp + eax*2 - 0x666], 0
lea ecx, [ebp - 0xaa0]
call fcn.00418360
push eax
lea ecx, [ebp - 0x664]
push ecx
call fcn.0042bff5
add esp, 8
lea ecx, [ebp - 0xaa4]
call fcn.00418360
push eax
lea edx, [ebp - 0x664]
push edx
call fcn.0042bff5
add esp, 8
push 0
lea eax, [ebp - 0x664]
push eax
lea ecx, [ebp - 0x24]
call fcn.00422280
mov dword [ebp - 0x444], eax
cmp dword [ebp - 0x444], 0
je 0x405b02
lea ecx, [ebp - 0x24]
call fcn.004220c7
mov dword [ebp - 0x444], eax
lea ecx, [ebp - 0xadc]
push ecx
lea ecx, [ebp - 0x24]
call fcn.0042251f
mov dword [ebp - 0xb1c], eax
lea ecx, [ebp - 0xaa4]
call fcn.00418360
push eax
mov ecx, dword [ebp - 0xb1c]
call fcn.00418360
push eax
call fcn.0042ca45
add esp, 8
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0xad5], al
lea ecx, [ebp - 0xadc]
call fcn.00402b10
movzx edx, byte [ebp - 0xad5]
test edx, edx
je 0x405b00
mov dword [ebp - 0x440], 1
jmp 0x405b02
jmp 0x405a87
cmp dword [ebp - 0x440], 0
jne 0x405b5c
mov dword [ebp - 0xae0], 0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xae0]
jmp 0x40628e
cmp dword [ebp - 0xa8c], 0x10
jne 0x405bd1
lea eax, [ebp - 0xaa4]
push eax
mov ecx, dword [ebp - 0xb14]
call fcn.00405570
test eax, eax
jne 0x405bcc
mov dword [ebp - 0xae4], 0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xae4]
jmp 0x40628e
jmp 0x405ec6
mov ecx, dword [ebp - 0xb14]
add ecx, 0x58
push ecx
lea edx, [ebp - 0x234]
push edx
call fcn.0042c01f
add esp, 8
lea eax, [ebp - 0x234]
push eax
call fcn.0042c43d
add esp, 4
movzx ecx, word [ebp + eax*2 - 0x236]
cmp ecx, 0x5c
jne 0x405c1f
lea edx, [ebp - 0x234]
push edx
call fcn.0042c43d
add esp, 4
mov word [ebp + eax*2 - 0x236], 0
lea ecx, [ebp - 0xa98]
call fcn.00418360
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0042bff5
add esp, 8
lea ecx, [ebp - 0xa9c]
call fcn.00418360
push eax
lea ecx, [ebp - 0x234]
push ecx
call fcn.0042bff5
add esp, 8
lea edx, [ebp - 0x234]
push edx
mov eax, dword [ebp - 0xb14]
mov ecx, dword [eax + 0x54]
call fcn.00403a50
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0xb14]
call fcn.004054f0
test eax, eax
jne 0x405dc9
lea ecx, [ebp - 0xab4]
call fcn.00402a80
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xab0]
call fcn.00402a80
mov byte [ebp - 4], 7
push 0x91
lea ecx, [ebp - 0xab4]
call fcn.00402cb0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
lea ecx, [ebp - 0xab4]
call fcn.00418360
push eax
lea ecx, [ebp - 0xab0]
push ecx
call fcn.004046f0
add esp, 0xc
push 0
push 4
lea ecx, [ebp - 0xab0]
call fcn.00418360
push eax
call fcn.0050ac4f
cmp eax, 7
jne 0x405d5a
mov dword [ebp - 0xae8], 0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xab0]
call fcn.00402b10
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xab4]
call fcn.00402b10
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xae8]
jmp 0x40628e
mov dword [ebp - 0xaec], 1
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xab0]
call fcn.00402b10
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xab4]
call fcn.00402b10
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xaec]
jmp 0x40628e
mov ecx, dword [ebp - 0xb14]
add ecx, 0x280
call fcn.00406ab0
push eax
lea edx, [ebp - 0x43c]
push edx
call fcn.0042c01f
add esp, 8
lea eax, [ebp - 0x43c]
push eax
call fcn.0042c43d
add esp, 4
movzx ecx, word [ebp + eax*2 - 0x43e]
cmp ecx, 0x5c
jne 0x405e1f
lea edx, [ebp - 0x43c]
push edx
call fcn.0042c43d
add esp, 4
mov word [ebp + eax*2 - 0x43e], 0
lea ecx, [ebp - 0xaa0]
call fcn.00418360
push eax
lea eax, [ebp - 0x43c]
push eax
call fcn.0042bff5
add esp, 8
lea ecx, [ebp - 0xaa4]
call fcn.00418360
push eax
lea ecx, [ebp - 0x43c]
push ecx
call fcn.0042bff5
add esp, 8
lea edx, [ebp - 0x234]
push edx
lea eax, [ebp - 0x43c]
push eax
mov ecx, dword [ebp - 0xb14]
mov ecx, dword [ecx + 0x54]
call fcn.00403b30
test eax, eax
jne 0x405ec6
mov dword [ebp - 0xaf0], 0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xaf0]
jmp 0x40628e
jmp 0x405999
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xa80]
call fcn.00402b10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xaa4]
call fcn.00406c40
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x45c]
call fcn.00406ee0
jmp 0x40626f
mov ecx, dword [ebp - 0xb14]
add ecx, 0x280
call fcn.00406ab0
push eax
lea edx, [ebp - 0x43c]
push edx
call fcn.0042c01f
add esp, 8
lea eax, [ebp - 0x43c]
push eax
call fcn.0042c43d
add esp, 4
movzx ecx, word [ebp + eax*2 - 0x43e]
cmp ecx, 0x5c
jne 0x405f53
lea edx, [ebp - 0x43c]
push edx
call fcn.0042c43d
add esp, 4
mov word [ebp + eax*2 - 0x43e], 0
mov ecx, dword [ebp + 8]
add ecx, 4
call fcn.00418360
push eax
lea eax, [ebp - 0x43c]
push eax
call fcn.0042bff5
add esp, 8
mov ecx, dword [ebp + 8]
call fcn.00418360
push eax
lea ecx, [ebp - 0x43c]
push ecx
call fcn.0042bff5
add esp, 8
push 0
lea edx, [ebp - 0x43c]
push edx
lea ecx, [ebp - 0x24]
call fcn.00422280
mov dword [ebp - 0x444], eax
cmp dword [ebp - 0x444], 0
je 0x406015
lea ecx, [ebp - 0x24]
call fcn.004220c7
mov dword [ebp - 0x444], eax
lea eax, [ebp - 0xaf8]
push eax
lea ecx, [ebp - 0x24]
call fcn.0042251f
mov dword [ebp - 0xb20], eax
mov ecx, dword [ebp + 8]
call fcn.00418360
push eax
mov ecx, dword [ebp - 0xb20]
call fcn.00418360
push eax
call fcn.0042ca45
add esp, 8
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0xaf1], al
lea ecx, [ebp - 0xaf8]
call fcn.00402b10
movzx ecx, byte [ebp - 0xaf1]
test ecx, ecx
je 0x406013
mov dword [ebp - 0x440], 1
jmp 0x406015
jmp 0x405f9d
cmp dword [ebp - 0x440], 0
jne 0x406042
mov dword [ebp - 0xafc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xafc]
jmp 0x40628e
mov edx, dword [ebp - 0xb14]
add edx, 0x58
push edx
lea eax, [ebp - 0x234]
push eax
call fcn.0042c01f
add esp, 8
lea ecx, [ebp - 0x234]
push ecx
call fcn.0042c43d
add esp, 4
movzx edx, word [ebp + eax*2 - 0x236]
cmp edx, 0x5c
jne 0x406090
lea eax, [ebp - 0x234]
push eax
call fcn.0042c43d
add esp, 4
mov word [ebp + eax*2 - 0x236], 0
mov ecx, dword [ebp + 8]
add ecx, 0xc
call fcn.00418360
push eax
lea ecx, [ebp - 0xab8]
push ecx
call fcn.0040a700
add esp, 8
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xab8]
call fcn.00418360
push eax
lea edx, [ebp - 0x234]
push edx
call fcn.0042bff5
add esp, 8
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00418360
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0042bff5
add esp, 8
lea ecx, [ebp - 0x234]
push ecx
mov edx, dword [ebp - 0xb14]
mov ecx, dword [edx + 0x54]
call fcn.00403a50
mov eax, dword [ebp - 0xb14]
cmp dword [eax + 0x27c], 0
jne 0x406210
lea ecx, [ebp - 0x234]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406210
lea edx, [ebp - 0x234]
push edx
mov eax, dword [ebp - 0xb14]
mov ecx, dword [eax + 0x54]
call fcn.00404240
mov dword [ebp - 0xabc], eax
mov ecx, dword [ebp - 0xabc]
mov dword [ebp - 0xb24], ecx
cmp dword [ebp - 0xb24], 3
ja case.default.0x40615c
mov edx, dword [ebp - 0xb24]
jmp dword [edx*4 + 0x4062b8]
jmp 0x406210
mov dword [ebp - 0xb00], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xab8]
call fcn.00402b10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xb00]
jmp 0x40628e
mov eax, dword [ebp - 0xb14]
mov dword [eax + 0x27c], 1
jmp 0x406210
mov dword [ebp - 0xb04], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xab8]
call fcn.00402b10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xb04]
jmp 0x40628e
mov dword [ebp - 0xb08], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xab8]
call fcn.00402b10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xb08]
jmp 0x40628e
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x43c]
push edx
mov eax, dword [ebp - 0xb14]
mov ecx, dword [eax + 0x54]
call fcn.00403b30
test eax, eax
jne 0x406260
mov dword [ebp - 0xb0c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xab8]
call fcn.00402b10
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xb0c]
jmp 0x40628e
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xab8]
call fcn.00402b10
mov dword [ebp - 0xb10], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.00422211
mov eax, dword [ebp - 0xb10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x28]
xor ecx, ebp
call fcn.0042b9ea
mov esp, ebp
pop ebp
ret 4