Function at 0x411949
Capabilities:
Check if file exists
Copy file
Create directory
Delete file
Get common file path
Write file on windows

Disassembly:
mov eax, 0x463833
call fcn.00461c40
sub esp, 0x33c
push esi
push edi
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 0xc]
xor esi, esi
cmp eax, esi
mov dword [ebp - 4], esi
jne 0x41196f
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
je 0x411dcc
mov al, byte [ebp + 0x1b]
push ebx
push esi
lea ecx, [ebp - 0x38]
mov byte [ebp - 0x38], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
mov esi, str.Contents_
push esi
call ebx
pop ecx
push eax
push esi
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov esi, str.TemplateSWFDetail.html
mov byte [ebp - 4], 1
push esi
call ebx
pop ecx
push eax
push esi
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::append_unsigned_short_int_const___unsigned_int_]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.Ht4Dll.dll_public:_static_unsigned_short_int_const____cdecl_CHtPath::BuildExePath_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int____]
mov eax, dword [ebp - 0x34]
pop ecx
test eax, eax
jne 0x4119da
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
call edi
test eax, eax
jne 0x4119e8
xor esi, esi
jmp 0x411dbc
mov ax, word [0x4845cc]
mov ecx, 0x81
mov word [ebp - 0x348], ax
xor eax, eax
lea edi, [ebp - 0x346]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x348]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x411aa7
lea eax, [ebp - 0x348]
push str.PrCrTemplateDetailShow
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x348]
push eax
call edi
test eax, eax
jne 0x411a53
push eax
lea eax, [ebp - 0x348]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x348]
push eax
call edi
test eax, eax
je 0x4119e1
lea eax, [ebp - 0x348]
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x348]
push eax
call edi
test eax, eax
jne 0x411a88
lea eax, [ebp - 0x348]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x348]
push eax
call ebx
mov esi, dword [ebp + 0x18]
pop ecx
push eax
lea eax, [ebp - 0x348]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
jmp 0x411aaa
mov esi, dword [ebp + 0x18]
mov eax, dword [esi + 4]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
xor edi, edi
cmp eax, edi
jne 0x411abb
mov eax, ecx
cmp dword [ebp - 0x34], edi
je 0x411ac3
mov ecx, dword [ebp - 0x34]
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4119e1
mov al, byte [ebp + 0x1b]
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esi + 4]
mov byte [ebp - 4], 2
cmp eax, edi
jne 0x411af4
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea ecx, [ebp - 0x1c]
push ecx
push eax
call fcn.00411f99
pop ecx
test eax, eax
pop ecx
jne 0x411b0b
xor esi, esi
jmp 0x411dad
and byte [ebp - 0x140], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x13f]
mov esi, str._templateswf_
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
stosb byte es:[edi], al
call sub.MSVCRT.dll_strlen
pop ecx
xor ebx, ebx
push eax
push ebx
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov edi, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp edi, dword [eax]
je 0x411be7
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x411b57
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push ebx
push ebx
lea ecx, [ebp - 0x140]
push 0x104
push ecx
push 0xffffffffffffffff
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
call sub.MSVCRT.dll_strlen
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x140]
push eax
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x3c]
push edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::replace_unsigned_int__unsigned_int__char_const___unsigned_int_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov edi, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp edi, dword [eax]
je 0x411be7
push esi
call sub.MSVCRT.dll_strlen
mov esi, eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x140]
push eax
push esi
push edi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::replace_unsigned_int__unsigned_int__char_const___unsigned_int_]
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call fcn.00412067
mov esi, str._swfWidth_
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push ebx
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov edi, dword [sym.imp.MSVCRT.dll__itoa]
mov ebx, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp ebx, dword [eax]
je 0x411cb3
and byte [ebp - 0x140], 0
lea eax, [ebp - 0x140]
push 0xa
push eax
push dword [ebp - 0x28]
call edi
push esi
call sub.MSVCRT.dll_strlen
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x14
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x140]
push eax
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::replace_unsigned_int__unsigned_int__char_const___unsigned_int_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push ebx
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov ebx, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp ebx, dword [eax]
je 0x411cb3
push esi
call sub.MSVCRT.dll_strlen
mov esi, eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x140]
push eax
push esi
push ebx
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::replace_unsigned_int__unsigned_int__char_const___unsigned_int_]
mov esi, str._swfHeight_
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push 0
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov ebx, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp ebx, dword [eax]
je 0x411d61
and byte [ebp - 0x140], 0
lea eax, [ebp - 0x140]
push 0xa
push eax
push dword [ebp - 0x24]
call edi
push esi
call sub.MSVCRT.dll_strlen
mov edi, eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x14
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x140]
push eax
push edi
push ebx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::replace_unsigned_int__unsigned_int__char_const___unsigned_int_]
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push ebx
push esi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov edi, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp edi, dword [eax]
je 0x411d61
push esi
call sub.MSVCRT.dll_strlen
mov esi, eax
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x140]
push eax
push esi
push edi
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::replace_unsigned_int__unsigned_int__char_const___unsigned_int_]
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
test eax, eax
jne 0x411d70
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0x47fe50
push eax
call fcn.00411ded
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x411b04
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x411d93
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push esi
push dword [ebp - 0x14]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push 1
pop esi
push 1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
and byte [ebp - 4], 0
push 1
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
pop ebx
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 8]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 0x14