Function at 0x405710
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ebdb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x240
mov al, byte [ebp + 0xb]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0x34], 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 ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x24a]
mov word [ebp - 0x24c], bx
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x24c]
mov dword [ebp - 4], ebx
push ecx
stosw word es:[edi], ax
call fcn.0040ba50
mov edx, dword [str.js_antispyConfig.js]
lea eax, [ebp - 0x24c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
lea ecx, [ebp - 0x24c]
push ebx
push ecx
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 0x14
test eax, eax
jne 0x40595c
mov dl, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], dl
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_]
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x24c]
push SysReAllocStringLen
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
je 0x405892
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jbe 0x40588b
push esi
mov dword [ebp - 0x14], ebx
call sub.MFC42u.DLL_operatornew
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40588b
lea ecx, [ebp - 0x14]
push 0
push ecx
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405882
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.0040da50
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push ebx
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
lea ecx, [ebp - 0x24]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x40587f
mov edx, dword [ebp - 0x20]
push esi
push edi
push edx
call fcn.00403cf0
add esp, 0xc
lea ecx, [ebp - 0x24]
push esi
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__::_Eos_unsigned_int_]
mov edi, dword [ebp - 0x10]
push ebx
call sub.MFC42u.DLL_operatordelete
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [str.ksantispy.settings.webpageVersion__]
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push eax
mov esi, eax
call ebx
add esp, 4
lea ecx, [ebp - 0x24]
push eax
push 0
push esi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov edi, eax
mov eax, dword [str.ksantispy.settings.webpageVersion__]
push eax
call ebx
mov esi, eax
push 0x414cd0
add esi, edi
call ebx
add esp, 8
lea ecx, [ebp - 0x24]
push eax
push esi
push 0x414cd0
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
test esi, esi
jl 0x405931
test eax, eax
jl 0x405931
sub eax, esi
lea ecx, [ebp - 0x44]
push eax
push esi
push ecx
lea ecx, [ebp - 0x24]
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__::substr_unsigned_int__unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [ebp - 4], 2
mov ecx, dword [edx]
push ecx
push 0
push eax
lea ecx, [ebp - 0x34]
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_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x405931
mov al, byte [ecx - 1]
test al, al
je 0x405925
cmp al, 0xff
je 0x405925
dec al
mov byte [ecx - 1], al
jmp 0x405931
lea eax, [ecx - 2]
push eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x40595a
mov al, byte [ecx - 1]
test al, al
je 0x40594e
cmp al, 0xff
je 0x40594e
dec al
mov byte [ecx - 1], al
jmp 0x40595a
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
xor ebx, ebx
mov esi, dword [ebp + 8]
mov dl, byte [ebp - 0x34]
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
lea edx, [ebp - 0x34]
mov ecx, dword [eax]
push ecx
push ebx
push edx
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_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov ecx, dword [ebp - 0x30]
cmp ecx, ebx
je 0x4059a7
mov al, byte [ecx - 1]
test al, al
je 0x40599b
cmp al, 0xff
je 0x40599b
dec al
mov byte [ecx - 1], al
jmp 0x4059a7
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x258]
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4