Function at 0x405e70
Capabilities:
Check if file exists

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4892d8
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x13d8
call fcn.00468970
mov eax, dword [0x4b0070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x126c], 0
mov dword [ebp - 4], 0
mov ecx, dword [ebx + 8]
lea ecx, [ecx - 0x10]
call fcn.00403340
lea edi, [eax + 0x10]
mov dword [ebp - 0x1280], edi
mov byte [ebp - 4], 1
mov ecx, 1
sub ecx, dword [edi - 4]
mov eax, dword [edi - 8]
or eax, ecx
jge 0x405f00
push 0
lea ecx, [ebp - 0x1280]
call fcn.00402190
mov edi, dword [ebp - 0x1280]
mov ecx, edi
mov dword [ebp - 0x1228], 0
xorps xmm0, xmm0
mov dword [ebp - 0x1224], 0
movups xmmword [ebp - 0x1238], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405f23
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x1238]
call fcn.0040eeb0
mov byte [ebp - 4], 2
mov esi, 9
mov eax, dword [ebp - 0x1238]
mov dword [ebp - 0x126c], esi
nop dword [eax]
nop dword [eax + eax]
sub esp, 0x18
lea edx, [ebp - 0x1238]
cmp dword [ebp - 0x1224], 8
mov ecx, esp
xorps xmm0, xmm0
mov dword [ebp - 0x1270], ecx
cmovae edx, eax
mov eax, dword [ebp - 0x1228]
mov dword [ebp - 0x1274], edx
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
cmp eax, 0x7ffffffe
ja 0x4069a8
mov dword [ecx + 0x14], 7
cmp eax, 8
jae 0x405fbd
mov dword [ecx + 0x10], eax
movups xmm0, xmmword [edx]
movups xmmword [ecx], xmm0
jmp 0x406016
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x405fd1
mov esi, SysReAllocString
jmp 0x405fdc
cmp esi, 0xa
mov eax, 0xa
cmovb esi, eax
lea eax, [esi + 1]
push eax
call fcn.0040ef50
mov ecx, dword [ebp - 0x1270]
mov edx, dword [ebp - 0x1228]
mov dword [ecx], eax
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], esi
lea ecx, [edx*2 + 2]
push ecx
push dword [ebp - 0x1274]
push eax
call fcn.004696f0
mov esi, dword [ebp - 0x126c]
add esp, 0xc
call fcn.00405aa0
add esp, 0x18
test al, al
jne 0x406042
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x1238]
dec esi
mov dword [ebp - 0x126c], esi
test esi, esi
jg 0x405f60
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1224]
cmp eax, 8
jb 0x406086
mov edx, dword [ebp - 0x1238]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40607c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4069d0
push ecx
push edx
call fcn.00467ca1
add esp, 8
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.00469580
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xorps xmm0, xmm0
mov dword [ebp - 0x1258], 0
xor eax, eax
mov dword [ebp - 0x1254], 7
movups xmmword [ebp - 0x1268], xmm0
mov word [ebp - 0x1268], ax
movups xmmword [ebp - 0x1250], xmm0
mov dword [ebp - 0x1240], eax
mov dword [ebp - 0x123c], 7
mov word [ebp - 0x1250], ax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x220]
movups xmmword [ebp - 0x1238], xmm0
mov dword [ebp - 0x1228], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x1224], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406115
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x1238]
call fcn.0040eeb0
lea eax, [ebp - 0x1250]
mov byte [ebp - 4], 5
push eax
lea edx, [ebp - 0x1268]
lea ecx, [ebp - 0x1238]
call fcn.00405830
mov byte [ebp - 4], 4
add esp, 4
mov ecx, dword [ebp - 0x1224]
mov byte [ebp - 0x1279], al
cmp ecx, 8
jb 0x4061a6
mov edx, dword [ebp - 0x1238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406196
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4069ad
push ecx
push edx
call fcn.00467ca1
mov al, byte [ebp - 0x1279]
add esp, 8
or esi, 0xffffffff
test al, al
je 0x4068a9
cmp dword [ebp - 0x123c], 8
lea esi, [ebp - 0x1250]
cmovae esi, dword [ebp - 0x1250]
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x4069b2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1278], eax
push esi
lea ecx, [ebp - 0x1278]
mov byte [ebp - 4], 6
call fcn.00401f70
test al, al
jne 0x406221
test esi, esi
jne 0x406200
xor ecx, ecx
jmp 0x406214
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406205
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x1278]
call fcn.00402220
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1278]
mov esi, dword [ebp - 0x1278]
mov eax, dword [esi - 0xc]
add eax, 0xfffffffc
push eax
push 0
lea eax, [ebp - 0x1274]
push eax
call fcn.00402c40
mov byte [ebp - 4], 8
lea ecx, [esi - 0x10]
mov edx, dword [eax]
mov dword [ebp - 0x1270], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x126c], eax
cmp eax, ecx
je 0x4062c2
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x4062ad
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x4062ad
mov ecx, dword [ebp - 0x126c]
call fcn.00403340
mov dword [ebp - 0x126c], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x4062a2
mov esi, dword [ebp - 0x1270]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x126c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1278], esi
jmp 0x4062c2
push dword [edx - 0xc]
lea ecx, [ebp - 0x1278]
push edx
call fcn.00402220
mov esi, dword [ebp - 0x1278]
mov byte [ebp - 4], 7
or eax, 0xffffffff
mov edx, dword [ebp - 0x1274]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4062e4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi - 0xc], 0
jl 0x40688b
push str.wzxxdt
push esi
call fcn.00469064
add esp, 8
test eax, eax
je 0x40688b
sub eax, esi
sar eax, 1
js 0x40688b
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x4069bc
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1274], eax
push str.wzxxdt
lea ecx, [ebp - 0x1274]
mov byte [ebp - 4], 9
call fcn.00401f70
test al, al
jne 0x406357
push 6
push str.wzxxdt
lea ecx, [ebp - 0x1274]
call fcn.00402220
push edi
push 0x49a27c
lea eax, [ebp - 0x1220]
push 0x400
push eax
call fcn.0040f0f0
add esp, 0x10
lea eax, [ebp - 0x1220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40639f
push eax
push 0x80
push 2
push eax
push 3
push 0x40000000
lea eax, [ebp - 0x1220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1338], 0x49a784
mov dword [ebp - 0x12c0], 0
mov dword [ebp - 0x12a0], 0
mov dword [ebp - 0x129c], 0
mov dword [ebp - 0x1298], 0
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x1328]
push ecx
xorps xmm0, xmm0
mov dword [ebp - 0x126c], 1
push eax
lea ecx, [ebp - 0x12c8]
mov dword [ebp - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [ebp - 0x12cc], 0x58
movlpd qword [ebp - 0x1330], xmm0
call fcn.0040c3f0
mov dword [ebp - 4], 0xd
mov eax, dword [ebp - 0x1338]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x1338]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x133c], eax
lea ecx, [ebp - 0x1328]
call fcn.0040bb50
push ecx
push 1
lea eax, [ebp - 0x1220]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x1328]
call fcn.0040ba10
test eax, eax
jne 0x406490
mov eax, dword [ebp - 0x1338]
lea ecx, [ebp - 0x1338]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.0040e730
push 0x800
lea eax, [ebp - 0xa20]
mov byte [ebp - 4], 0xf
push 0
push eax
call fcn.00469580
add esp, 0xc
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x4069c6
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1270], eax
push 0x499b14
lea ecx, [ebp - 0x1270]
mov byte [ebp - 4], 0x10
call fcn.00401f70
test al, al
jne 0x4064f3
push 0
push 0x499b14
lea ecx, [ebp - 0x1270]
call fcn.00402220
sub esp, 8
mov byte [ebp - 4], 0x11
lea eax, [ebp - 0xa20]
lea ecx, [ebp - 0x1338]
push eax
call fcn.0040abb0
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
test byte [ecx + eax + 0xc], 6
jne 0x406612
or edi, 0xffffffff
nop
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x4069b2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x126c], eax
lea eax, [ebp - 0xa20]
mov byte [ebp - 4], 0x12
push eax
lea ecx, [ebp - 0x126c]
call fcn.00401f70
test al, al
jne 0x406584
lea ecx, [ebp - 0xa20]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406562
sub ecx, edx
lea eax, [ebp - 0xa20]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x126c]
call fcn.00402220
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x1270]
mov esi, dword [ebp - 0x126c]
push dword [esi - 0xc]
push esi
call fcn.0040c610
cmp dword [esi - 0xc], 0
je 0x4065f7
push 1
push 0x49a2ac
lea ecx, [ebp - 0x1270]
call fcn.0040c610
mov byte [ebp - 4], 0x11
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4065d0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
sub esp, 8
lea eax, [ebp - 0xa20]
lea ecx, [ebp - 0x1338]
push eax
call fcn.0040abb0
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
test byte [ecx + eax + 0xc], 6
je 0x406520
jmp 0x406612
mov byte [ebp - 4], 0x11
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x406612
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x1328]
call fcn.0040b910
test eax, eax
jne 0x40664a
mov eax, dword [ebp - 0x1338]
lea ecx, [ebp - 0x1338]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.0040e730
mov esi, dword [ebp - 0x1274]
mov edi, dword [ebp - 0x1270]
test esi, esi
je 0x406678
cmp dword [edi - 0xc], 0
jl 0x406678
push esi
push edi
call fcn.00469064
add esp, 8
test eax, eax
je 0x406678
sub eax, edi
sar eax, 1
jns 0x4067d0
sub esp, 0xc
lea eax, [ebp - 0x1220]
lea ecx, [ebp - 0x13e8]
push eax
call fcn.00409b80
mov byte [ebp - 4], 0x14
mov ecx, 1
sub ecx, dword [esi - 4]
cmp dword [edi - 0xc], 0
mov eax, dword [esi - 8]
jne 0x4066d3
or eax, ecx
jge 0x4066b9
push 0
lea ecx, [ebp - 0x1274]
call fcn.00402190
mov esi, dword [ebp - 0x1274]
mov edx, esi
lea ecx, [ebp - 0x13e8]
call fcn.0040ca70
lea ecx, [ebp - 0x13e8]
call fcn.00409c90
jmp 0x406722
or eax, ecx
jge 0x4066ea
push 0
lea ecx, [ebp - 0x1274]
call fcn.00402190
mov esi, dword [ebp - 0x1274]
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
or eax, ecx
jge 0x40670c
push 0
lea ecx, [ebp - 0x1270]
call fcn.00402190
mov edi, dword [ebp - 0x1270]
mov edx, edi
lea ecx, [ebp - 0x13e8]
call fcn.0040ca70
mov edx, esi
mov ecx, eax
call fcn.0040ca70
lea ecx, [ebp - 0x13e4]
call fcn.0040b910
test eax, eax
jne 0x40675a
mov eax, dword [ebp - 0x13e8]
lea ecx, [ebp - 0x13e8]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.0040e730
mov eax, dword [ebp - 0x13e8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x13e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x13ec], eax
lea ecx, [ebp - 0x13e4]
call fcn.0040a830
mov eax, dword [ebp - 0x13e8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x13e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x13ec], eax
lea eax, [ebp - 0x1380]
mov byte [ebp - 4], 0x15
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00466937
add esp, 4
lea edx, [edi - 0x10]
mov byte [ebp - 4], 0xf
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4067ee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1338]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x1338]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x133c], eax
lea ecx, [ebp - 0x1328]
call fcn.0040a830
mov eax, dword [ebp - 0x1338]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x1338]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x133c], eax
lea eax, [ebp - 0x12c8]
mov byte [ebp - 4], 0x16
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00466937
add esp, 4
mov byte [ebp - 4], 7
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40687f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x1280]
mov esi, dword [ebp - 0x1278]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 4
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4068a9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x123c]
cmp ecx, 8
jb 0x4068ed
mov edx, dword [ebp - 0x1250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4068e3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4069d0
push ecx
push edx
call fcn.00467ca1
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x1254]
mov dword [ebp - 0x1240], 0
mov dword [ebp - 0x123c], 7
mov word [ebp - 0x1250], ax
cmp ecx, 8
jb 0x40694e
mov edx, dword [ebp - 0x1268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406944
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4069d0
push ecx
push edx
call fcn.00467ca1
add esp, 8
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x406969
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebx + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x406988
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0046780a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
call fcn.0040ef40
call fcn.0046c9ef
push 0x80004005
call fcn.00402200
push 0x80004005
call fcn.00402200
push 0x80004005
call fcn.00402200
call fcn.0046c9ef
int3