Function at 0x439da0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4635f4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push ebx
push ebp
mov ebp, dword [esp + 0x48]
push esi
push edi
mov edi, dword [eax]
lea ebx, [ebp + 0x18]
mov ecx, ebx
mov dword [esp + 0x14], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Split_void_]
mov eax, dword [ebx + 8]
cmp eax, edi
jae 0x439ddf
mov edi, eax
test edi, edi
jbe 0x439e16
mov ecx, dword [ebx + 4]
sub eax, edi
push eax
lea edx, [ecx + edi]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov esi, dword [ebx + 8]
add esp, 0xc
sub esi, edi
mov ecx, ebx
push 0
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x439e16
mov eax, dword [ebx + 4]
mov dword [ebx + 8], esi
add eax, esi
mov byte [eax], 0
mov eax, dword [ebp + 4]
mov ecx, 0x4713ac
test al, 0x40
je 0x439e29
mov ecx, 0x477cfc
jmp 0x439e32
test al, 0x20
je 0x439e32
mov ecx, 0x472f48
push ecx
mov ecx, dword [esp + 0x50]
xor esi, esi
push ecx
mov dword [ebp], esi
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, esi
mov dword [ebp], eax
jne 0x439e9a
lea edx, [esp + 0x1c]
push edx
call fcn.00436a60
add esp, 4
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov dword [esp + 0x44], esi
mov edx, dword [ecx]
mov ecx, ebx
push edx
push esi
push eax
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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x20]
mov dword [esp + 0x48], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
xor al, al
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov ecx, dword [ebp + 4]
mov byte [esp + 0x50], 1
test cl, 0x10
mov dword [esp + 0x4c], esi
je 0x43a169
push 2
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push eax
call esi
mov eax, dword [ebp]
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [ebp]
push 0
push 0
push ecx
mov dword [ebp + 8], eax
call esi
mov eax, dword [ebp + 8]
mov esi, 0x400
add esp, 0x1c
cmp eax, esi
mov dword [esp + 0x10], esi
jge 0x439ef3
test eax, eax
mov dword [esp + 0x10], eax
je 0x43a1b1
mov esi, eax
push esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x14], eax
test esi, esi
je 0x439f27
mov edx, dword [ebp]
push edx
push 1
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
sete al
test al, al
mov byte [esp + 0x50], al
je 0x43a157
mov ecx, dword [ebp + 4]
mov dword [ebp + 0x10], 1
and ecx, 0xfffffffa
mov dword [esp + 0x18], 0
mov dword [ebp + 4], ecx
mov eax, dword [0x475c90]
test eax, eax
je 0x43a008
mov eax, dword [esp + 0x4c]
mov esi, 0x475c94
mov edi, dword [esi]
test edi, edi
jle 0x439f75
cmp eax, dword [esp + 0x10]
jge 0x439f75
mov edx, dword [esp + 0x14]
mov ecx, dword [esi - 4]
mov dl, byte [edx + eax]
cmp dl, byte [ecx + eax]
jne 0x439f75
inc eax
cmp eax, edi
jl 0x439f5b
cmp eax, edi
je 0x439f94
mov edi, dword [esp + 0x18]
mov ecx, dword [esi + 0xc]
add esi, 0x10
inc edi
xor eax, eax
mov dword [esp + 0x18], edi
test ecx, ecx
jne 0x439f55
mov dword [esp + 0x4c], eax
jmp 0x43a008
mov ecx, dword [esp + 0x18]
mov edi, dword [ebp + 4]
mov esi, dword [ebp + 8]
mov dword [esp + 0x4c], eax
shl ecx, 4
sub esi, eax
mov edx, dword [ecx + 0x475c9c]
mov dword [ebp + 8], esi
or edx, edi
cmp eax, 2
mov dword [ebp + 4], edx
jne 0x439fbd
mov dword [ebp + 0x10], eax
mov esi, dword [ecx + 0x475c98]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [ebp + 0x28]
push 1
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, edx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43a008
mov ecx, dword [esp + 0x18]
mov edi, dword [ebp + 0x2c]
lea eax, [ebp + 0x28]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
push ecx
mov ecx, eax
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x4c]
cmp edi, esi
jle 0x43a024
mov edx, dword [ebp]
push 0
push esi
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test esi, esi
jne 0x43a0fb
mov al, byte [esp + 0x50]
push esi
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], 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_]
push 1
push edi
lea ecx, [esp + 0x24]
mov dword [esp + 0x4c], 1
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43a080
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov byte [ecx + eax], 0
mov eax, dword [esp + 0x20]
push ecx
test eax, eax
mov dword [esp + 0x1c], esp
mov ecx, esp
jne 0x43a094
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]
lea edx, [esp + 0x30]
mov dword [ecx], eax
push edx
call fcn.00436460
add esp, 8
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x44], 2
mov edx, dword [ecx]
lea ecx, [ebp + 0x28]
push edx
push 0
push eax
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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0x48], 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_]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
test eax, eax
je 0x43a0fb
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x43a0f2
cmp al, 0xff
je 0x43a0f2
dec al
mov byte [ecx], al
jmp 0x43a0fb
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [ebp + 0x30]
test eax, eax
jne 0x43a157
mov eax, dword [esp + 0x14]
cmp byte [eax], 0x3c
jne 0x43a157
mov edi, str.UTF_8
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x28]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, edx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43a157
mov edx, dword [esp + 0x18]
mov edi, dword [ebp + 0x2c]
mov ecx, edx
mov esi, str.UTF_8
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x2c]
mov dword [ebp + 0x30], edx
add eax, edx
mov byte [eax], 0
mov ecx, dword [esp + 0x14]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x43a287
test cl, 0x20
je 0x43a1b1
test cl, 0x40
mov dword [ebp + 0x10], 1
je 0x43a187
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
test eax, eax
jne 0x43a1b1
mov eax, dword [0x475c90]
xor ecx, ecx
test eax, eax
je 0x43a1b1
mov edx, dword [ebp + 4]
mov eax, 0x475c90
test dword [eax + 0xc], edx
jne 0x43a1f5
mov esi, dword [eax + 0x10]
add eax, 0x10
inc ecx
test esi, esi
jne 0x43a1a1
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x43a4a5
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [ebp + 0x30]
lea esi, [ebp + 0x28]
mov ebp, ecx
mov eax, dword [edx]
cmp eax, ebp
jae 0x43a1d2
mov ebp, eax
cmp ebx, esi
jne 0x43a309
push eax
push ebp
mov ecx, 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__::erase_unsigned_int__unsigned_int_]
push 0
push 0
mov ecx, 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__::erase_unsigned_int__unsigned_int_]
jmp 0x43a38a
shl ecx, 4
mov dword [esp + 0x50], ecx
mov ecx, dword [ecx + 0x475c94]
cmp ecx, 2
mov dword [esp + 0x4c], ecx
jne 0x43a25c
mov edx, dword [esp + 0x50]
mov dword [ebp + 0x10], ecx
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [edx + 0x475c98]
lea ebx, [ebp + 0x28]
mov edi, esi
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43a25c
mov eax, dword [esp + 0x18]
mov edi, dword [ebx + 4]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
mov ebx, dword [ebx + 4]
add ebx, eax
mov byte [ebx], 0
mov eax, dword [ebp]
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [edx + 0x475c90]
push 1
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, dword [esp + 0x24]
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x50]
mov al, byte [esp + 0x50]
test al, al
jne 0x43a1b1
lea ecx, [esp + 0x2c]
push ecx
call fcn.00436a60
add esp, 4
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov dword [esp + 0x44], 3
mov ecx, dword [edx]
push ecx
push 0
push eax
mov ecx, 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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x43a2f4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x43a2eb
cmp al, 0xff
je 0x43a2eb
dec al
mov byte [ecx], al
xor al, al
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor al, al
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
test ebp, ebp
jbe 0x43a352
cmp ebp, ecx
jne 0x43a352
mov eax, dword [esi + 4]
test eax, eax
jne 0x43a31d
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]
cmp byte [eax - 1], 0xfe
jae 0x43a352
push 1
mov ecx, ebx
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]
test eax, eax
jne 0x43a339
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]
mov dword [ebx + 4], eax
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov edx, dword [esi + 0xc]
mov dword [ebx + 0xc], edx
mov cl, byte [eax - 1]
inc cl
mov byte [eax - 1], cl
jmp 0x43a38a
push 1
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43a38a
mov esi, dword [esi + 4]
test esi, esi
jne 0x43a36e
mov esi, 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]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov eax, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x43a3fb
mov edi, str._BOM_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [ebx + 8]
sub edx, ecx
cmp edx, esi
ja 0x43a3ba
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x43a3fb
mov eax, dword [ebx + 8]
mov ebp, esi
add ebp, eax
push 0
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x43a3fb
mov edi, dword [ebx + 8]
mov eax, dword [ebx + 4]
mov ecx, esi
add edi, eax
mov eax, ecx
mov esi, str._BOM_
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [ecx + ebp], 0
mov edi, 0x47147c
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
repne scasb al, byte es:[edi]
mov eax, dword [edx]
mov edx, dword [ebx + 8]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x43a423
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x43a4a5
mov ebp, dword [ebx + 8]
add ebp, esi
cmp ebp, 0xfffffffd
jbe 0x43a437
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x43a45d
mov al, byte [ecx - 1]
test al, al
je 0x43a45d
cmp al, 0xff
je 0x43a45d
test ebp, ebp
jne 0x43a475
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x43a4a5
test ebp, ebp
jne 0x43a470
test ecx, ecx
je 0x43a4a5
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
jmp 0x43a4a5
cmp dword [ebx + 0xc], ebp
jae 0x43a47e
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, 0x47147c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [eax + ebp], 0
mov ecx, dword [esp + 0x3c]
mov al, byte [esp + 0x50]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x38
ret