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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c3977
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
mov eax, dword [0x4f840c]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
mov eax, dword [0x4f840c]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
lea esi, [edi + 0x18]
or eax, 0xffffffff
xor ecx, ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x20], esi
call fcn.004088d6
mov eax, dword [edi + 4]
mov ecx, 0x4dfaa4
test al, 0x40
je 0x407ac8
mov ecx, 0x4dfaac
jmp 0x407ad1
test al, 0x20
je 0x407ad1
mov ecx, 0x4dfab4
push ecx
push dword [ebp + 8]
xor esi, esi
mov dword [edi], esi
call dword [sym.imp.MSVCR100.dll__wfopen]
pop ecx
pop ecx
mov dword [edi], eax
cmp eax, esi
jne 0x407b18
lea eax, [esp + 0x2c]
push eax
call sym.Uninstall.exe_protected:_static_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_CMarkup::x_GetLastError_void_
pop ecx
mov ebx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc0], esi
call fcn.004089fe
lea esi, [esp + 0x2c]
xor edi, edi
push 1
call fcn.00408e84
xor al, al
jmp 0x407e1e
mov ecx, dword [edi + 4]
mov byte [esp + 0x13], 1
mov dword [esp + 0x14], esi
test cl, 0x10
je 0x407d9e
mov ebx, dword [sym.imp.MSVCR100.dll_fseek]
push 2
push esi
push eax
call ebx
push dword [edi]
call dword [sym.imp.MSVCR100.dll_ftell]
push esi
push esi
push dword [edi]
mov dword [edi + 8], eax
call ebx
mov eax, dword [edi + 8]
mov ebx, 0x400
add esp, 0x1c
cmp eax, ebx
jge 0x407b63
mov ebx, eax
cmp ebx, esi
je 0x407de4
push ebx
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_]
push dword [edi]
mov dword [esp + 0x2c], eax
push 1
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x14
dec eax
neg eax
sbb al, al
inc al
mov byte [esp + 0x13], al
je 0x407d8e
and dword [edi + 4], 0xfffffffa
mov dword [edi + 0x10], 1
mov dword [esp + 0x18], esi
cmp dword [0x4fa3d0], esi
je 0x407c40
xor ecx, ecx
mov eax, dword [ecx + 0x4fa3d4]
cmp eax, esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
jle 0x407bde
cmp esi, ebx
jge 0x407bde
mov edx, dword [esp + 0x24]
mov eax, dword [ecx + 0x4fa3d0]
mov dl, byte [edx + esi]
cmp dl, byte [esi + eax]
jne 0x407bde
inc esi
mov dword [esp + 0x14], esi
cmp esi, dword [esp + 0x1c]
jl 0x407bbd
cmp esi, dword [esp + 0x1c]
je 0x407c00
inc dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
and dword [esp + 0x14], 0
shl ecx, 4
xor esi, esi
cmp dword [ecx + 0x4fa3d0], esi
jne 0x407bab
jmp 0x407c40
mov eax, dword [esp + 0x18]
shl eax, 4
mov ecx, dword [eax + 0x4fa3dc]
or ecx, dword [edi + 4]
sub dword [edi + 8], esi
push 2
mov dword [edi + 4], ecx
pop ecx
cmp esi, ecx
jne 0x407c20
mov dword [edi + 0x10], ecx
mov eax, dword [eax + 0x4fa3d8]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
mov ecx, dword [esp + 0x1c]
lea esi, [edi + 0x34]
call fcn.0040885a
xor esi, esi
cmp ebx, dword [esp + 0x14]
jle 0x407c56
push esi
push dword [esp + 0x18]
push dword [edi]
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
cmp dword [esp + 0x14], esi
jne 0x407d67
xor eax, eax
mov dword [esp + 0x40], 7
mov dword [esp + 0x3c], esi
mov word [esp + 0x2c], ax
push ebx
push dword [esp + 0x28]
mov dword [esp + 0xc8], 1
push ecx
mov eax, esp
mov dword [esp + 0x28], esp
push ecx
mov dword [eax], str.UTF_8
mov eax, esp
mov dword [eax], str.UTF_16
lea eax, [esp + 0x74]
mov dword [esp + 0x2c], esp
push eax
call fcn.00401ac0
xor ecx, ecx
push 2
pop edx
lea eax, [ebx + 1]
mul edx
seto cl
mov byte [esp + 0xc0], 2
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_]
pop ecx
mov dword [esp + 0x18], eax
mov eax, ebx
lea ecx, [esp + 0x2c]
call fcn.00408977
push dword [esp + 0x18]
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0xac], ebx
call sym.Uninstall.exe_protected:_static_int___cdecl_CMarkup::x_ConvertEncoding_struct_CMarkup::ConvertEncoding___void__
pop ecx
pop ecx
mov ecx, dword [esp + 0x18]
lea esi, [esp + 0x2c]
call fcn.0040885a
push dword [esp + 0x18]
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
cmp dword [esp + 0x44], 8
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x20], esp
mov eax, esp
jae 0x407d18
mov ecx, esi
mov dword [eax], ecx
lea eax, [esp + 0x4c]
push eax
call sym.Uninstall.exe_public:_static_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_CMarkup::GetDeclaredEncoding_struct_MCD_CSTR_
pop ecx
pop ecx
mov ebx, eax
lea eax, [edi + 0x34]
mov byte [esp + 0xc0], 3
call fcn.004089fe
push 1
xor edi, edi
lea esi, [esp + 0x4c]
call fcn.00408e84
lea ebx, [esp + 0x64]
call fcn.00407ed0
or dword [esp + 0xc0], 0xffffffff
push 1
lea esi, [esp + 0x30]
call fcn.00408e84
mov edi, dword [esp + 0x28]
xor esi, esi
cmp dword [edi + 0x44], esi
jne 0x407d8e
mov eax, dword [esp + 0x24]
cmp byte [eax], 0x3c
jne 0x407d8e
mov ebx, str.UTF_8
push ebx
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
lea esi, [edi + 0x34]
mov ecx, ebx
call fcn.0040885a
xor esi, esi
push dword [esp + 0x24]
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
pop ecx
jmp 0x407e9b
test cl, 0x20
je 0x407de4
mov dword [edi + 0x10], 1
test cl, 0x40
je 0x407dba
push eax
call dword [sym.imp.MSVCR100.dll_ftell]
pop ecx
mov dword [edi + 8], eax
cmp dword [edi + 8], esi
jne 0x407de4
xor ebx, ebx
cmp dword [0x4fa3d0], esi
je 0x407de4
mov ecx, dword [edi + 4]
xor eax, eax
test dword [eax + 0x4fa3dc], ecx
jne 0x407e42
inc ebx
mov eax, ebx
shl eax, 4
cmp dword [eax + 0x4fa3d0], esi
jne 0x407dce
cmp dword [edi + 0x44], esi
je 0x407e1a
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push esi
lea eax, [edi + 0x34]
call fcn.00408b5a
cmp dword [esp + 0x14], esi
je 0x407e0c
push str._BOM_
push dword [esp + 0x24]
call fcn.0040883a
push 0x4df5f0
push dword [esp + 0x24]
call fcn.0040883a
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.00485d44
mov esp, ebp
pop ebp
ret
shl ebx, 4
mov ecx, dword [ebx + 0x4fa3d4]
push 2
pop eax
mov dword [esp + 0x14], ecx
cmp ecx, eax
jne 0x407e79
mov dword [edi + 0x10], eax
mov eax, dword [ebx + 0x4fa3d8]
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
mov ecx, dword [esp + 0x28]
lea esi, [edi + 0x34]
call fcn.0040885a
xor esi, esi
push dword [edi]
push 1
push dword [esp + 0x1c]
push dword [ebx + 0x4fa3d0]
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov byte [esp + 0x13], al
cmp byte [esp + 0x13], 0
jne 0x407de4
lea eax, [esp + 0x48]
push eax
call sym.Uninstall.exe_protected:_static_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_CMarkup::x_GetLastError_void_
pop ecx
mov ebx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc0], 4
call fcn.004089fe
lea esi, [esp + 0x48]
jmp 0x407b08