Function at 0x4213d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a23d4
mov eax, dword fs:[0]
push eax
sub esp, 0x1d0
mov eax, dword [0x4c9860]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebx
push esi
push edi
mov eax, dword [0x4c9860]
xor eax, esp
push eax
lea eax, [esp + 0x1e0]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x18], 0
cmp dword [ebx + 0x10], 0
jne 0x42142d
xor al, al
jmp 0x421b30
call fcn.004245a0
mov edx, ebx
lea ecx, [esp + 0x1a8]
call fcn.0042c680
mov dword [esp + 0x1e8], 0
cmp dword [eax + 0x10], 0
jne 0x421455
xor al, al
jmp 0x42146a
cmp dword [eax + 0x14], 8
jb 0x42145d
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
test al, al
sete al
mov dword [esp + 0x1e8], 0xffffffff
cmp dword [esp + 0x1bc], 8
mov byte [esp + 0x13], al
jb 0x42149b
push dword [esp + 0x1a8]
call fcn.0047cf40
mov al, byte [esp + 0x17]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x1bc], 7
mov dword [esp + 0x1b8], 0
mov word [esp + 0x1a8], cx
test al, al
je 0x421534
mov cl, byte [esi + 0xd]
mov eax, dword [esi + 0x10]
mov edx, ebx
mov byte [eax + 4], cl
lea ecx, [esp + 0x1a8]
call fcn.0042c680
mov ecx, eax
mov dword [esp + 0x1e8], 1
call fcn.00444f00
mov byte [esi + 0xc], al
mov dword [esp + 0x1e8], 0xffffffff
cmp dword [esp + 0x1bc], 8
jb 0x42150f
push dword [esp + 0x1a8]
call fcn.0047cf40
add esp, 4
xor eax, eax
mov dword [esp + 0x1bc], 7
mov dword [esp + 0x1b8], 0
mov word [esp + 0x1a8], ax
jmp 0x421b2d
xor eax, eax
mov dword [esp + 0x1b8], ecx
mov dword [esp + 0x1bc], ecx
push eax
mov dword [esp + 0x1bc], ecx
push 0x4b33dc
lea ecx, [esp + 0x1b0]
mov dword [esp + 0x1c4], 7
mov word [esp + 0x1b0], ax
call fcn.0040c0d0
lea eax, [esp + 0x1a8]
push eax
lea edx, [esp + 0x198]
lea ecx, [esp + 0x18c]
mov dword [esp + 0x1ec], 2
call fcn.004511d0
add esp, 4
mov dword [esp + 0x1e8], 0xffffffff
cmp dword [esp + 0x1bc], 8
jb 0x4215bd
push dword [esp + 0x1a8]
call fcn.0047cf40
add esp, 4
xor eax, eax
mov ecx, edi
mov dword [esp + 0x1bc], 7
mov dword [esp + 0x1b8], 0
mov word [esp + 0x1a8], ax
call fcn.0040bc60
push eax
push 0
push 0
lea eax, [esp + 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, eax
test edi, edi
je 0x421634
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x421634
push 0xbb8
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x421634
push edi
mov byte [esi + 0xc], 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x421b2d
push ecx
lea ecx, [esp + 0xd0]
call fcn.00422b10
mov dword [esp + 0x1e8], 3
cmp dword [ebx + 0x14], 0x10
jb 0x421656
mov eax, dword [ebx]
jmp 0x421658
mov eax, ebx
cmp dword [esp + 0x12c], 0
jne 0x4216fc
push 0x40
push 1
push eax
call fcn.00479a56
add esp, 0xc
test eax, eax
je 0x4216fc
push 1
push eax
lea ecx, [esp + 0xe4]
call fcn.0041f2a0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0xe0]
call fcn.00424130
push eax
mov byte [esp + 0x1ec], 4
call fcn.00422560
add esp, 4
lea ecx, [esp + 0xdc]
push eax
call fcn.0041f4c0
mov byte [esp + 0x1e8], 3
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4216da
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4216da
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0xcc]
mov eax, dword [eax + 4]
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
mov edx, 4
cmove eax, edx
jmp 0x42171e
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0xcc]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x42171e
or eax, 4
push 0
push eax
call fcn.00427fe0
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x12c], 0
jne 0x42175e
mov byte [esi + 0xc], 0
lea ecx, [esp + 0xcc]
mov dword [esp + 0x1e8], 0xffffffff
call fcn.004227b0
jmp 0x421b2d
mov dword [esp + 0x84], vtable.std::ios_base.0
mov dword [esp + 0x1c], 0x4b38b4
mov dword [esp + 0x2c], 0x4b38ac
mov dword [esp + 0x84], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
push ecx
lea eax, [esp + 0x38]
mov byte [esp + 0x1ec], 5
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], 1
call fcn.00423bf0
mov dword [esp + 0x1e8], 6
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x1c], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [esp + ecx + 0x18], eax
lea eax, [esp + 0x34]
mov ecx, eax
mov dword [esp + 0x14], eax
call fcn.00423f20
mov byte [esp + 0x1e8], 7
mov dword [esp + 0x34], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1ec], 9
call fcn.00422830
lea ecx, [esp + 0xdc]
call fcn.0041f1f0
test eax, eax
jne 0x42184d
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0xcc]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x421845
or eax, 4
push 0
push eax
call fcn.00427fe0
lea eax, [esp + 0x1c0]
push eax
lea ecx, [esp + 0x20]
call fcn.00422df0
lea eax, [esp + 0x1c0]
mov byte [esp + 0x1e8], 0xa
mov ecx, dword [esi + 0x10]
push eax
push ebx
add ecx, 4
call fcn.0044aad0
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
cmp dword [esp + 0x1d0], 0
mov byte [esi + 0xd], al
jne 0x421917
mov byte [esi + 0xc], 1
mov byte [esp + 0x1e8], 9
cmp dword [esp + 0x1d4], 0x10
jb 0x4218ba
push dword [esp + 0x1c0]
call fcn.0047cf40
add esp, 4
mov dword [esp + 0x1d4], 0xf
mov dword [esp + 0x1d0], 0
mov byte [esp + 0x1c0], 0
lea ecx, [esp + 0x84]
mov byte [esp + 0x1e8], 3
call fcn.00422d70
lea eax, [esp + 0x84]
mov dword [esp + 0x84], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
push eax
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.004792bb
add esp, 4
jmp 0x421742
lea eax, [esp + 0x1c0]
push eax
mov ecx, esi
call fcn.00424670
mov byte [esi + 0xc], al
mov byte [esp + 0x1e8], 9
cmp dword [esp + 0x1d4], 0x10
jb 0x42194a
push dword [esp + 0x1c0]
call fcn.0047cf40
add esp, 4
mov dword [esp + 0x1d4], 0xf
mov dword [esp + 0x1d0], 0
mov byte [esp + 0x1c0], 0
mov byte [esp + 0x1e8], 3
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x1c], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [esp + ecx + 0x18], eax
lea ecx, [esp + 0x34]
call fcn.00422e70
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x1c], vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x20]
mov dword [esp + ecx + 0x18], eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x2c], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [esp + ecx + 0x28], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x1c], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [esp + ecx + 0x18], eax
lea eax, [esp + 0x84]
mov dword [esp + 0x84], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
push eax
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.004792bb
mov dword [esp + 0x1ec], 0xffffffff
mov eax, dword [esp + 0xd0]
add esp, 4
mov eax, dword [eax + 4]
mov dword [esp + eax + 0xcc], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0xcc]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [esp + ecx + 0xc8], eax
cmp dword [esp + 0x12c], 0
mov dword [esp + 0xdc], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x421a92
mov edx, dword [esp + 0xe8]
lea eax, [esp + 0x120]
cmp dword [edx], eax
jne 0x421a92
mov eax, dword [esp + 0x114]
mov ecx, dword [esp + 0x118]
mov dword [edx], eax
mov eax, dword [esp + 0xf8]
mov dword [eax], ecx
mov eax, dword [esp + 0x108]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [esp + 0x128], 0
je 0x421aa8
lea ecx, [esp + 0xdc]
call fcn.0041f1f0
mov edi, dword [esp + 0x110]
mov dword [esp + 0xdc], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test edi, edi
je 0x421ade
mov ecx, dword [edi]
test ecx, ecx
je 0x421ad5
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x421ad5
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push edi
call fcn.0047cf40
add esp, 4
mov eax, dword [esp + 0xcc]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0xcc], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0xcc]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [esp + ecx + 0xc8], eax
lea eax, [esp + 0x13c]
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004792bb
add esp, 4
mov al, byte [esi + 0xc]
mov ecx, dword [esp + 0x1e0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.0047cf45
mov esp, ebp
pop ebp
ret 8