Function at 0x4173b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43f538
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x458504]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
jne 0x4173ec
xor eax, eax
jmp 0x417575
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
test eax, eax
je 0x41741b
mov eax, dword [edi + 0x30]
mov ecx, edi
mov edx, dword [edi + 0x20]
mov esi, dword [eax]
add esi, dword [edx]
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp eax, esi
jae 0x41741b
mov ecx, edi
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov byte [eax], bl
jmp 0x417573
cmp dword [edi + 0x50], 0
jne 0x417429
or eax, 0xffffffff
jmp 0x417575
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
lea eax, [edi + 0x44]
cmp ecx, eax
jne 0x417445
push dword [edi + 0x3c]
mov eax, dword [edi + 0x38]
mov ecx, edi
push eax
push eax
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp dword [edi + 0x40], 0
jne 0x41746a
push dword [edi + 0x50]
movsx eax, bl
push eax
call dword [sym.imp.MSVCR120.dll_fputc]
or ecx, 0xffffffff
add esp, 8
cmp eax, ecx
cmovne ecx, ebx
mov eax, ecx
jmp 0x417575
mov ecx, 0xf
mov byte [ebp - 0x28], 0
xorps xmm0, xmm0
mov byte [ebp - 0x2c], bl
cmp ecx, 0x10
movq qword [ebp - 0x28], xmm0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14], ecx
cmovae eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], 8
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
lea ecx, [ecx]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
cmovae edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
add eax, edx
push eax
push ecx
mov ecx, dword [edi + 0x40]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2b]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [edi + 0x48]
push eax
call dword [sym.imp.MSVCP120.dll_public:_int___thiscall_std::codecvt_char__char__int_::out_int___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x41755f
cmp eax, 1
jg 0x417540
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
cmp ecx, 0x10
mov esi, dword [ebp - 0x30]
cmovae eax, edx
sub esi, eax
je 0x417516
push dword [edi + 0x50]
cmp ecx, 0x10
lea eax, [ebp - 0x28]
push esi
cmovae eax, edx
push 1
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x41755f
lea eax, [ebp - 0x2c]
mov byte [edi + 0x45], 1
cmp dword [ebp - 0x34], eax
jne 0x417562
test esi, esi
jne 0x4174a0
cmp dword [ebp - 0x18], 0x20
jae 0x41755f
push esi
push 8
lea ecx, [ebp - 0x28]
call fcn.00412600
jmp 0x4174a0
cmp eax, 3
jne 0x41755f
push dword [edi + 0x50]
push dword [ebp - 0x2c]
call fcn.004143f0
or ecx, 0xffffffff
add esp, 8
test al, al
cmovne ecx, ebx
mov ebx, ecx
jmp 0x417562
or ebx, 0xffffffff
cmp dword [ebp - 0x14], 0x10
jb 0x417573
push dword [ebp - 0x28]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043d084
mov esp, ebp
pop ebp
ret 4