Function at 0x4f49e0
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x50249f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
push ebx
push esi
xor esi, esi
push edi
lea ecx, [esp + 0x34]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x94], esi
mov ecx, dword [eax + 4]
mov ecx, dword [ecx]
mov edi, eax
mov dword [esp + 0x1c], edi
mov esi, ecx
nop
test edi, edi
mov ebx, dword [eax + 4]
je 0x4f4a3b
cmp edi, eax
je 0x4f4a41
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, ebx
je 0x4f4c24
mov eax, dword [ebp + 8]
push 0x5231c0
add eax, 4
push eax
lea ecx, [esp + 0x74]
push ecx
call dword [sym.imp.MSVCP80.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___wchar_t_const__]
add esp, 0xc
mov ebx, eax
test edi, edi
mov byte [esp + 0x94], 1
jne 0x4f4a77
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [edi + 4]
jne 0x4f4a82
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
lea eax, [esi + 8]
push eax
lea edx, [esp + 0x54]
push ebx
push edx
call dword [sym.imp.MSVCP80.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
add esp, 0xc
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x98], 2
call dword [0x5096b8]
lea ecx, [esp + 0x50]
mov byte [esp + 0x94], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x6c]
mov byte [esp + 0x94], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x4c], 8
mov eax, dword [esp + 0x38]
jae 0x4f4adb
lea eax, [esp + 0x38]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4f4bff
xor eax, eax
cmp esi, dword [edi + 4]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov word [esp + 0x30], ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
jne 0x4f4b22
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov cx, word [esi + 0x1c]
push 0
push ebx
mov word [esp + 0x30], cx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, dword [edi + 4]
mov dword [esp + 0x2a], eax
jne 0x4f4b43
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
mov edx, dword [esi + 0x1c]
mov edi, dword [ebp + 0xc]
push 0
lea eax, [esp + 0x14]
push eax
lea edx, [ecx + edx*2 + 0xe]
push 4
lea ecx, [esp + 0x30]
push ecx
push edi
mov dword [esp + 0x42], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x34]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x1c]
cmp esi, dword [ecx + 4]
jne 0x4f4b90
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esi + 0x20], 8
jb 0x4f4b9b
mov eax, dword [esi + 0xc]
jmp 0x4f4b9e
lea eax, [esi + 0xc]
movzx ecx, word [esp + 0x28]
push 0
lea edx, [esp + 0x14]
push edx
add ecx, ecx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x36]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x3a]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push ebx
lea edi, [esp + 0x20]
mov dword [esp + 0x20], 0
call fcn.004f4800
mov ecx, dword [ebp + 8]
push ebx
mov dword [ecx + 0x40], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x10]
cmp esi, dword [eax + 4]
mov dword [esp + 0x1c], eax
jne 0x4f4c11
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esi]
add dword [esp + 0x14], 1
mov edi, dword [esp + 0x1c]
mov eax, dword [ebp + 0x10]
jmp 0x4f4a30
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x40]
lea ecx, [esp + 0x34]
mov dword [esp + 0x94], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [esp + 0x8c]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc