Function at 0x438aa0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x84
mov eax, dword [esp + 0x88]
push ebx
push ebp
push esi
push edi
push 0x465bf4
push eax
mov byte [esp + 0x1b], 1
call dword [sym.imp.MSVCRT.dll_fopen]
mov ecx, eax
add esp, 8
test ecx, ecx
mov dword [esp + 0x18], ecx
jne 0x438b35
mov ebp, dword [esp + 0xa0]
test ebp, ebp
je 0x438b28
call dword [sym.imp.MSVCRT.dll__errno]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_strerror]
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
mov ecx, ebp
push 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 0x438b28
mov edi, dword [ebp + 4]
mov ecx, ebx
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 eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x84
ret
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x438b48
mov edx, dword [eax]
mov dword [esp + 0x14], edx
jmp 0x438b50
mov dword [esp + 0x14], 0
xor eax, eax
mov byte [esp + 0x1c], 0
mov dword [esp + 0x1d], eax
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov dword [esp + 0x29], eax
mov word [esp + 0x2d], ax
mov byte [esp + 0x2f], al
mov eax, dword [esp + 0x9c]
mov edi, dword [eax + 8]
test edi, edi
je 0x438ba0
mov eax, dword [eax + 4]
test eax, eax
jne 0x438b8a
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]
push ecx
push 1
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x13]
lea ecx, [esp + 0x1c]
push edi
push ecx
lea edx, [esp + 0x38]
push str._s_d_bytes
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ebp, dword [esp + 0xb0]
add esp, 0x10
test ebp, ebp
je 0x438c60
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebx
jae 0x438bea
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x438c10
mov al, byte [ecx - 1]
test al, al
je 0x438c10
cmp al, 0xff
je 0x438c10
test ebx, ebx
jne 0x438c36
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
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 0x438c60
test ebx, ebx
jne 0x438c20
push 1
mov ecx, ebp
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 0x438c60
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x438c2c
cmp eax, ebx
jae 0x438c3f
push 1
mov ecx, ebp
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 ebx
mov ecx, ebp
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 [ebp + 4]
mov ecx, ebx
mov eax, ecx
lea esi, [esp + 0x30]
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 [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ecx + ebx], 0
mov al, byte [esp + 0x13]
test al, al
jne 0x438d1a
test ebp, ebp
je 0x438d1a
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, dword [eax]
push edx
call dword [sym.imp.MSVCRT.dll_strerror]
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebx
jae 0x438ca8
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x438cce
mov al, byte [ecx - 1]
test al, al
je 0x438cce
cmp al, 0xff
je 0x438cce
test ebx, ebx
jne 0x438cf4
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
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 0x438d1a
test ebx, ebx
jne 0x438cde
push 1
mov ecx, ebp
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 0x438d1a
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x438cea
cmp eax, ebx
jae 0x438cfd
push 1
mov ecx, ebp
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 ebx
mov ecx, ebp
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 [ebp + 4]
mov ecx, ebx
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 ecx, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ecx + ebx], 0
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0xa8]
add esp, 4
test eax, eax
je 0x438d39
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret