Function at 0x405070
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49d1ad
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
xor eax, eax
mov dword [ebp - 0x34], 0
push esi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 7
mov word [ebp - 0x34], ax
xor ebx, ebx
mov dword [ebp - 4], eax
push ebx
call fcn.0040ff60
add esp, 4
movzx eax, al
lea ecx, [ebp - 0x34]
push ebx
push ecx
push ebx
push ebx
push eax
call fcn.00445640
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
cmp edx, 8
jb 0x4050d9
test ecx, ecx
je 0x40532d
cmp edx, 8
lea eax, [ebp - 0x34]
cmovae eax, ecx
cmp word [eax], bx
je 0x40532d
cmp edx, 8
lea eax, [ebp - 0x34]
cmovae eax, ecx
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405327
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.0044b760
add esp, 8
mov eax, dword [ebp + 8]
shr eax, 0x10
mov byte [ebp - 4], 1
test al, 1
je 0x405312
push edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
call fcn.00409630
mov ecx, eax
call fcn.00421e10
mov edi, dword [ebp - 0x18]
mov eax, 0x38e38e39
mov esi, dword [ebp - 0x1c]
mov ecx, edi
sub ecx, esi
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [ebp - 0x10], ecx
test ecx, ecx
jle 0x4051b7
xor edi, edi
mov dword [ebp + 8], ecx
nop
lea ecx, [edi + 0x18]
add ecx, esi
cmp dword [ecx + 0x14], 0x10
jb 0x40518d
mov ecx, dword [ecx]
cmp dword [ebp - 0x38], 0x10
lea eax, [ebp - 0x4c]
push ecx
cmovae eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x4051a5
inc ebx
mov esi, dword [ebp - 0x1c]
add edi, 0x48
sub dword [ebp + 8], 1
jne 0x405180
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4051c0
mov dword [eax], ecx
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4051c9
mov dword [eax], ebx
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4051d9
xor eax, eax
cmp ebx, ecx
sete al
mov dword [edx], eax
test esi, esi
je 0x405311
cmp esi, edi
je 0x4052d1
add esi, 0x44
nop dword [eax]
mov ecx, dword [esi]
cmp ecx, 0x10
jb 0x405223
mov eax, dword [esi - 0x14]
inc ecx
cmp ecx, 0x1000
jb 0x405219
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405373
mov eax, edx
push ecx
push eax
call fcn.00429ebb
add esp, 8
mov dword [esi - 4], 0
mov dword [esi], 0xf
mov byte [esi - 0x14], 0
mov ecx, dword [esi - 0x18]
cmp ecx, 0x10
jb 0x405268
mov eax, dword [esi - 0x2c]
inc ecx
cmp ecx, 0x1000
jb 0x40525e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405373
mov eax, edx
push ecx
push eax
call fcn.00429ebb
add esp, 8
mov dword [esi - 0x1c], 0
mov dword [esi - 0x18], 0xf
mov byte [esi - 0x2c], 0
mov ecx, dword [esi - 0x30]
cmp ecx, 0x10
jb 0x4052ae
mov eax, dword [esi - 0x44]
inc ecx
cmp ecx, 0x1000
jb 0x4052a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405373
mov eax, edx
push ecx
push eax
call fcn.00429ebb
add esp, 8
mov dword [esi - 0x34], 0
mov dword [esi - 0x30], 0xf
mov byte [esi - 0x44], 0
add esi, 0x48
lea ecx, [esi - 0x44]
cmp ecx, edi
jne 0x4051f0
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov eax, 0x38e38e39
sub ecx, esi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*8]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x405307
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405373
push ecx
push esi
call fcn.00429ebb
add esp, 8
pop edi
lea ecx, [ebp - 0x4c]
call fcn.00404350
mov edx, dword [ebp - 0x20]
mov esi, 1
mov ecx, dword [ebp - 0x34]
jmp 0x40532f
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
xor esi, esi
cmp edx, 8
jb 0x40535f
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405355
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405378
push edx
push ecx
call fcn.00429ebb
add esp, 8
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10
call fcn.004679af
call fcn.004679af
int3