Function at 0x406500
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x425dd3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7a4
push ebx
mov ebx, dword [esp + 0x7b8]
push ebp
push esi
push edi
xor edi, edi
cmp ebx, edi
mov dword [esp + 0x54], ecx
je 0x40659e
cmp dword [esp + 0x7cc], edi
jne 0x40654f
mov eax, dword [ecx + 0xc]
lea esi, [ecx + 8]
push eax
mov ecx, esi
call fcn.00408560
mov dword [esi + 4], edi
mov dword [esi], edi
mov dword [esi + 8], edi
push 0x430340
push ebx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebp, eax
add esp, 8
cmp ebp, edi
je 0x40659e
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push edi
push ebp
call ebx
push ebp
call dword [sym.imp.MSVCRT.dll_ftell]
mov esi, eax
add esp, 0x10
cmp esi, edi
je 0x406594
cmp esi, 0xffffffff
je 0x406594
push esi
call sub.MFC42u.DLL_operatornew
mov edi, eax
add esp, 4
test edi, edi
jne 0x4065bb
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor al, al
mov ecx, dword [esp + 0x7b4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x7b0
ret 0x10
push 0
push 0
push ebp
call ebx
push ebp
push esi
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
cmp eax, esi
je 0x4065e6
push edi
call sub.MFC42u.DLL_operatordelete
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
jmp 0x40659e
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov ebx, dword [esp + 0x7cc]
add esp, 4
test ebx, ebx
je 0x4066a2
lea ecx, [esp + 0x9c]
call fcn.00411380
push 0x10
push ebx
lea ecx, [esp + 0xa4]
mov dword [esp + 0x7c4], 0
call fcn.00411540
push esi
push edi
push 0
lea ecx, [esp + 0xa8]
call fcn.00411400
mov ebx, eax
test ebx, ebx
jl 0x40664a
push ebx
call sub.MFC42u.DLL_operatornew
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40666f
push edi
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x9c]
mov dword [esp + 0x7bc], 0xffffffff
call fcn.004113f0
jmp 0x40659e
push esi
push edi
push ebp
lea ecx, [esp + 0xa8]
call fcn.00411400
push edi
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x9c]
mov edi, ebp
mov esi, ebx
mov dword [esp + 0x7bc], 0xffffffff
call fcn.004113f0
mov cl, byte [esp + 0x13]
xor ebp, ebp
mov byte [esp + 0x5c], cl
push ebp
lea ecx, [esp + 0x60]
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 edx, dword [esp + 0x7d0]
lea eax, [esp + 0x5c]
push edx
push esi
push edi
push eax
mov dword [esp + 0x7cc], 1
call fcn.0040ee30
add esp, 0x10
cmp eax, 0xffffffff
push edi
jne 0x406703
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x5c]
mov dword [esp + 0x7bc], 0xffffffff
push 1
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_]
jmp 0x40659e
call sub.MFC42u.DLL_operatordelete
mov cl, byte [esp + 0x17]
add esp, 4
mov byte [esp + 0x30], cl
lea ecx, [esp + 0x30]
push ebp
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 0x2f
push 1
lea ecx, [esp + 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_int__unsigned_short_int_]
mov dl, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x44]
mov byte [esp + 0x7c0], 2
mov byte [esp + 0x44], 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_]
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x70]
mov byte [esp + 0x7c0], 3
mov byte [esp + 0x70], 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 cl, byte [esp + 0x13]
push ebp
mov byte [esp + 0x80], cl
lea ecx, [esp + 0x80]
mov byte [esp + 0x7c0], 4
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 [esp + 0x64]
mov eax, dword [esp + 0x60]
xor edi, edi
mov esi, ecx
cmp eax, ebp
mov byte [esp + 0x7bc], 5
mov dword [esp + 0x50], esi
jne 0x4067ab
mov edx, 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 dword [esp + 0x28], edx
jmp 0x4067af
mov dword [esp + 0x28], eax
cmp ecx, ebp
jle 0x406b1d
jmp 0x4067bb
xor ebp, ebp
push 1
lea eax, [esp + 0x5c]
push edi
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x64], 0xa
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]
or ebx, 0xffffffff
mov dword [esp + 0x20], eax
cmp eax, ebx
jne 0x4067e4
mov dword [esp + 0x20], esi
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 esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
sub esi, edi
mov eax, dword [edx]
lea edi, [ecx + edi*2]
push eax
push ebp
lea ecx, [esp + 0x48]
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__::erase_unsigned_int__unsigned_int_]
mov ecx, 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 edx, dword [ecx]
lea ecx, [esp + 0x6c]
push edx
push ebp
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__::erase_unsigned_int__unsigned_int_]
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]
mov ecx, dword [eax]
push ecx
push ebp
lea ecx, [esp + 0x84]
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__::erase_unsigned_int__unsigned_int_]
cmp edi, ebp
je 0x406b0a
cmp esi, ebp
je 0x406b0a
lea esi, [edi + esi*2]
xor eax, eax
cmp edi, esi
mov word [esp + 0x14], 0x20
mov word [esp + 0x16], 9
mov word [esp + 0x18], bp
mov edx, edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], 0xffffffff
jae 0x406920
mov cx, word [edx]
add edx, 2
cmp cx, 0x20
je 0x4068d7
cmp cx, 9
je 0x4068d7
cmp cx, 0xd
je 0x4068d7
cmp cx, 0x22
jne 0x4068aa
cmp ax, 0x5c
je 0x4068c9
mov ax, word [esp + 0x24]
neg ax
sbb eax, eax
and al, 0xde
add eax, 0x22
mov dword [esp + 0x24], eax
jmp 0x4068c9
cmp cx, 0x3b
jne 0x4068c9
cmp word [esp + 0x24], 0
jne 0x4068c9
test ax, ax
je 0x4068e4
cmp ax, 0x20
je 0x4068e4
cmp ax, 9
je 0x4068e4
mov eax, dword [esp + 0x1c]
test eax, eax
jge 0x4068d5
mov dword [esp + 0x1c], ebp
mov ebx, ebp
inc ebp
cmp edx, esi
mov eax, ecx
jb 0x406871
mov ebp, dword [esp + 0x2c]
jmp 0x406911
inc ebp
cmp ebp, 0xffffffff
je 0x406911
sub esi, edx
lea ecx, [esp + 0x7c]
sar esi, 1
push esi
push edx
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_]
lea ecx, [esp + 0x14]
push 0
lea edx, [esp + 0x80]
push ecx
push edx
call fcn.004030f0
add esp, 0xc
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
jne 0x4069ac
jmp 0x406924
mov ebp, dword [esp + 0x2c]
xor eax, eax
cmp ebp, 0xffffffff
setne al
cmp eax, 2
jne 0x406aac
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]
lea ecx, [esp + 0x40]
mov eax, dword [edx]
push eax
push 0
push ecx
lea ecx, [esp + 0x3c]
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 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 eax, dword [edx]
mov edx, dword [esp + 0x38]
sub eax, edx
cmp eax, 1
ja 0x406968
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [esp + 0x38]
push 0
lea esi, [ecx + 1]
lea ecx, [esp + 0x34]
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 0x406b0a
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
push 1
push 0x2f
lea eax, [eax + edx*2]
push eax
call fcn.00406b90
add esp, 0xc
lea ecx, [esp + 0x30]
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_]
jmp 0x406b0a
cmp word [edi + eax*2], 0x5b
lea esi, [edi + eax*2]
lea edi, [edi + ebx*2 + 2]
mov edx, esi
jne 0x406a16
add esi, 2
mov eax, esi
cmp eax, edi
jae 0x406b0a
mov cx, word [eax]
add eax, 2
cmp cx, 0x5d
je 0x4069de
cmp eax, edi
jb 0x4069c9
jmp 0x406b0a
sub eax, edx
lea ecx, [esp + 0x40]
sar eax, 1
sub eax, 2
push eax
push 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_]
lea eax, [esp + 0x14]
push 0
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.004030f0
mov eax, dword [esp + 0x54]
add esp, 0xc
test eax, eax
je 0x406b0a
jmp 0x406935
cmp esi, edi
jae 0x406b0a
mov ax, word [esi]
add esi, 2
cmp ax, 0x5c
je 0x406b0a
cmp ax, 0x22
je 0x406b0a
cmp ax, 0x3b
je 0x406b0a
cmp ax, 0x3d
je 0x406a51
cmp esi, edi
jb 0x406a1e
jmp 0x406b0a
mov eax, esi
lea ecx, [esp + 0x40]
sub eax, edx
sub eax, 2
sar eax, 1
push eax
push edx
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_]
lea ecx, [esp + 0x14]
push 1
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.004030f0
mov eax, dword [esp + 0x54]
add esp, 0xc
test eax, eax
je 0x406b0a
sub edi, esi
lea ecx, [esp + 0x6c]
sar edi, 1
push edi
push 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_]
lea eax, [esp + 0x14]
push 0xffffffffffffffff
lea ecx, [esp + 0x70]
push eax
push ecx
call fcn.004030f0
add esp, 0xc
jmp 0x406ab1
cmp eax, 3
jne 0x406b0a
lea ecx, [esp + 0x40]
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x90]
push edx
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0xc
mov ebx, dword [esp + 0x7cc]
lea edx, [esp + 0x6c]
cmp ebx, 1
mov byte [esp + 0x7bc], 6
sete cl
push ecx
push edx
push eax
mov eax, dword [esp + 0x60]
lea ecx, [eax + 4]
call fcn.00407f30
push 1
lea ecx, [esp + 0x90]
mov byte [esp + 0x7c0], 5
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 [esp + 0x20]
mov esi, dword [esp + 0x50]
lea edi, [ecx + 1]
cmp edi, esi
jl 0x4067b9
push 1
lea ecx, [esp + 0x80]
mov byte [esp + 0x7c0], 4
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 1
lea ecx, [esp + 0x70]
mov byte [esp + 0x7c0], 3
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 1
lea ecx, [esp + 0x44]
mov byte [esp + 0x7c0], 2
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 1
lea ecx, [esp + 0x34]
mov byte [esp + 0x7c0], 1
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 1
lea ecx, [esp + 0x60]
mov dword [esp + 0x7c0], 0xffffffff
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 al, 1
jmp 0x4065a0