Function at 0x406340
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46bb6c
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x4846a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
cmp byte [0x487aa5], 0
mov edi, 0x487980
mov dword [ebp - 0x19c], edi
je 0x4063be
push edi
call fcn.0040fb80
push 0x642
sub esp, 0x1c
mov ecx, esp
xor eax, eax
mov dword [ebp - 0x1a8], esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
mov word [ecx], ax
push eax
mov eax, 0x4776ac
call fcn.00430450
call fcn.00406e70
cmp byte [0x487aa4], 0
je 0x4064ee
mov ecx, dword [0x487a10]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push ecx
call esi
test eax, eax
je 0x406401
cmp byte [0x487aaa], 0
jne 0x406401
cmp byte [0x487aab], 0
jne 0x406401
mov edx, dword [0x487a10]
push edx
mov ecx, 0x487980
call fcn.0041c2e0
mov eax, dword [0x487a20]
push eax
call esi
test eax, eax
je 0x4064ee
cmp byte [0x487aaa], 0
jne 0x4064ee
cmp byte [0x487aab], 0
jne 0x4064ee
cmp byte [0x487ab0], 0
jne 0x4064ee
mov ecx, dword [0x487a20]
push ecx
mov ecx, 0x487980
call fcn.0041c2e0
mov eax, dword [0x487940]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1a8], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov eax, dword [0x487a40]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1a4], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
or ebx, 0xffffffff
lea esi, [ebp - 0x194]
mov dword [ebp - 4], ebx
call fcn.0041ccc0
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x194]
mov esi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
push edx
call esi
test eax, eax
je 0x4064c2
mov eax, dword [ebp - 0x194]
push eax
mov ecx, 0x487980
call fcn.0041c2e0
mov ecx, dword [0x487a40]
push ecx
call esi
test eax, eax
je 0x4064e0
mov edx, dword [0x487a40]
push edx
mov ecx, 0x487980
call fcn.0041c2e0
lea eax, [ebp - 0x194]
mov dword [ebp - 4], ebx
call fcn.00421240
cmp dword [0x4876f4], 0
je 0x406dcd
cmp dword [0x487b50], 0
je 0x406dcd
mov dword [ebp - 0x194], 0xa
lea eax, [ebp - 0xac]
push eax
xor ebx, ebx
mov dword [ebp - 4], 2
call fcn.00423dd0
lea ecx, [ebp - 0x264]
push ecx
mov byte [ebp - 4], 3
call fcn.00423600
mov byte [ebp - 0x1c0], bl
push 4
lea esi, [ebp - 0xac]
mov byte [ebp - 4], 4
call fcn.00429290
lea edx, [edi + 0x184]
mov ecx, eax
call fcn.004042d0
mov esi, eax
mov eax, dword [edi + 0x40]
cdq
push edx
push eax
call fcn.00404290
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0xac]
push eax
push edi
call fcn.00421070
push ebx
lea ecx, [ebp - 0x1b4]
mov dword [ebp - 0x1b4], ebx
mov dword [ebp - 0x1b0], ebx
call fcn.0042a1e0
mov byte [ebp - 4], 5
mov esi, dword [edi + 0x1d4]
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [ebp - 0x1b4]
mov dword [edi + 0x1d4], eax
mov dword [ebp - 0x1b0], ebx
mov dword [ebp - 0x1b4], ebx
mov dword [edi + 0x1d0], ecx
cmp esi, ebx
je 0x4065ef
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4065ef
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4065ef
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
mov edx, dword [ebp - 0x264]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x1a4], ecx
mov dword [ebp + eax - method.std::basic_istringstream_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_istringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
test byte [ebp - 0x214], 1
lea ecx, [ebp - 0x254]
mov dword [ebp - 0x198], ecx
mov dword [ebp - method.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
je 0x40663f
mov edx, dword [ebp - 0x244]
mov eax, dword [edx]
push eax
call fcn.0044ee8c
add esp, 4
mov eax, dword [ebp - 0x244]
mov dword [eax], ebx
mov ecx, dword [ebp - 0x234]
mov dword [ecx], ebx
mov edx, dword [ebp - 0x224]
mov dword [edx], ebx
mov eax, dword [ebp - 0x240]
mov dword [eax], ebx
mov ecx, dword [ebp - 0x230]
mov dword [ecx], ebx
mov edx, dword [ebp - 0x220]
mov dword [edx], ebx
and dword [ebp - 0x214], 0xfffffffe
mov dword [ebp - 0x218], ebx
mov dword [ebp - method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x1a0], eax
cmp eax, ebx
je 0x4066f2
mov ebx, dword [eax]
test ebx, ebx
je 0x4066e1
push 0
lea ecx, [ebp - 0x1ac]
call fcn.0044dadd
mov eax, dword [ebx + 4]
test eax, eax
je 0x4066bd
cmp eax, 0xffffffff
jae 0x4066bd
dec eax
mov dword [ebx + 4], eax
mov esi, dword [ebx + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [ebp - 0x1ac]
and esi, ebx
call fcn.0044db05
test esi, esi
je 0x4066e1
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
mov eax, dword [ebp - 0x1a0]
push eax
call fcn.0044ee8c
add esp, 4
xor ebx, ebx
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 6
call fcn.0044db41
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x264]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x20c]
mov dword [ebp + edx - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.0044da45
mov edx, dword [ebp - 0xac]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x5c]
add esp, 4
mov dword [ebp - 0x198], ecx
mov dword [ebp + eax - 0xac], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
test byte [ebp - 0x68], 1
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0xa8], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
je 0x40677c
mov edx, dword [ebp - 0x98]
mov eax, dword [edx]
push eax
call fcn.0044ee8c
add esp, 4
mov eax, dword [ebp - 0x98]
mov dword [eax], ebx
mov ecx, dword [ebp - 0x88]
mov dword [ecx], ebx
mov edx, dword [ebp - 0x78]
mov dword [edx], ebx
mov eax, dword [ebp - 0x94]
mov dword [eax], ebx
mov ecx, dword [ebp - 0x84]
mov dword [ecx], ebx
mov edx, dword [ebp - 0x74]
mov dword [edx], ebx
and dword [ebp - 0x68], 0xfffffffe
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0xa8], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x1a0], eax
cmp eax, ebx
je 0x40681e
mov ebx, dword [eax]
test ebx, ebx
je 0x40680f
push 0
lea ecx, [ebp - 0x1a8]
call fcn.0044dadd
mov eax, dword [ebx + 4]
test eax, eax
je 0x4067eb
cmp eax, 0xffffffff
jae 0x4067eb
dec eax
mov dword [ebx + 4], eax
mov esi, dword [ebx + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [ebp - 0x1a8]
and esi, ebx
call fcn.0044db05
test esi, esi
je 0x40680f
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
mov eax, dword [ebp - 0x1a0]
push eax
call fcn.0044ee8c
add esp, 4
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 8
call fcn.0044db41
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xac]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x5c]
mov dword [ebp + edx - 0xac], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
push eax
mov dword [ebp - 0x5c], vtable.std::ios_base.0
call fcn.0044da45
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x406891
cmp dword [edi + 0x18c], 0
je 0x4068c3
mov eax, dword [edi + 0x188]
cmp dword [eax - 0xc], 0
je 0x4068c3
push 0
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x198], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
call fcn.00418860
cmp byte [edi + 0x130], 0
je 0x406dcd
cmp byte [edi + 0x12f], 0
je 0x406b5c
cmp dword [edi + 0x190], 0
je 0x4069c6
mov dword [ebp - 4], 0xb
mov ecx, dword [edi + 0xa8]
call fcn.00448c00
test eax, eax
je 0x4069bf
mov edi, eax
lea ecx, [ebp - 0x190]
call fcn.00401f50
push 0x47ba08
lea ecx, [ebp - 0x190]
push ecx
call fcn.00453410
mov edx, dword [ebp - 0x1b8]
push edx
lea ecx, [ebp - 0x60]
call fcn.00401fd0
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x18]
push eax
sub esp, 0x1c
mov eax, esp
lea edx, [ebp - 0x60]
mov dword [ebp - 0x198], esp
call fcn.00422d00
call fcn.00406e70
mov byte [ebp - 4], 0xc
mov esi, 8
mov dword [ebp - 0x60], vtable.wexception_class_std::runtime_error_.0
cmp dword [ebp - 0x24], esi
jb 0x406972
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0044ee8c
add esp, 4
xor ebx, ebx
xor edx, edx
mov edi, 7
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
cmp dword [ebp - 0x40], esi
jb 0x406996
mov eax, dword [ebp - 0x54]
push eax
call fcn.0044ee8c
add esp, 4
xor ecx, ecx
mov word [ebp - 0x54], cx
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], ebx
call fcn.0044f16b
mov dword [ebp - 4], 0xffffffff
mov eax, 0x4069b7
ret
mov dword [ebp - 4], 0xffffffff
cmp dword [edi + 0x144], 0
je 0x406b77
mov dword [ebp - 4], 0xe
mov eax, dword [edi + 0xbc]
sub eax, 0x10
call fcn.004267f0
add eax, 0x10
mov dword [ebp - 0x194], eax
push 2
push 0x4721ac
lea ebx, [ebp - 0x194]
mov byte [ebp - 4], 0xf
call fcn.00424980
mov eax, dword [edi + 0xd0]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call fcn.00424980
push 1
push 0x4721b4
call fcn.00424980
mov eax, dword [edi + 0xb0]
mov edx, dword [edi + 0xa8]
mov esi, dword [ebp - 0x194]
mov ecx, dword [edi + 0xb4]
push eax
push edx
mov edx, esi
call fcn.00448af0
add esp, 8
test eax, eax
jne 0x406a78
mov ecx, dword [edi + 0xa8]
call fcn.00448d00
test eax, eax
je 0x406a96
mov edi, eax
lea ecx, [ebp - 0x144]
call fcn.00401f50
push 0x47ba08
lea edx, [ebp - 0x144]
push edx
call fcn.00453410
mov edi, eax
lea ecx, [ebp - 0xf8]
call fcn.00401f50
push 0x47ba08
lea eax, [ebp - 0xf8]
push eax
call fcn.00453410
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0xe
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406b70
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406b70
cmp dword [edi + 0x190], 0
je 0x406b77
mov ecx, dword [edi + 0xa8]
call fcn.00448c00
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [edi + 0x170]
cmp dword [ecx - 0xc], 0
je 0x406dcd
push ecx
mov edx, esp
mov dword [ebp - 0x198], esp
push edx
mov ecx, 0x4776a8
call fcn.00401110
mov dword [ebp - 4], 0x14
mov eax, dword [edi + 0x170]
push ecx
sub eax, 0x10
mov dword [ebp - 0x1a4], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x1ac]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.0041c870
push ecx
mov ecx, esp
mov dword [ebp - 4], 0x15
mov dword [ebp - 0x198], esp
push ecx
mov ecx, 0x4776a8
call fcn.00401110
mov byte [ebp - 4], 0x16
mov eax, dword [edi + 0x170]
push ecx
sub eax, 0x10
mov dword [ebp - 0x1a4], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x1a0]
mov byte [ebp - 4], 0x15
call fcn.0041c720
mov byte [ebp - 4], 0x17
nop
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [edi + 0x178]
mov esi, dword [ebp - 0x1a0]
push 0
push 1
push edx
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x198], esp
mov dword [ebp - 0x1a8], esp
call edx
cmp dword [esi - 4], 0
lea edx, [esi - 4]
jl 0x406c6f
cmp eax, dword [esi - 0x10]
jne 0x406c6f
lea ebx, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x406ca7
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
je 0x406de9
mov eax, dword [esi - 0xc]
mov dword [ebx + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [ebx + 0x10]
push eax
call fcn.0044eef7
add esp, 0x10
mov ecx, dword [ebp - 0x1a8]
add ebx, 0x10
mov dword [ecx], ebx
call fcn.004197d0
test al, al
jne 0x406c20
mov edx, dword [ebp - 0x1ac]
push edx
mov ecx, edi
call fcn.0041c2e0
mov eax, dword [edi + 0x9c]
push ecx
sub eax, 0x10
mov dword [ebp - 0x198], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0x18
mov eax, dword [edi + 0x98]
push ecx
sub eax, 0x10
mov dword [ebp - 0x1a4], esp
mov esi, esp
call fcn.004267f0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x19c]
mov byte [ebp - 4], 0x17
call fcn.0041ccc0
mov byte [ebp - 4], 0x19
mov eax, dword [ebp - 0x19c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
push eax
call esi
test eax, eax
je 0x406d3d
mov ecx, dword [ebp - 0x19c]
push ecx
mov ecx, edi
call fcn.0041c2e0
mov eax, dword [edi + 0x98]
push eax
call esi
test eax, eax
je 0x406d58
mov eax, dword [edi + 0x98]
push eax
mov ecx, edi
call fcn.0041c2e0
mov byte [ebp - 4], 0x17
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406d7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x1a0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406da4
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 - 0x1ac]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406dcd
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 ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044ee97
mov esp, ebp
pop ebp
ret
call fcn.00428230
int3