Function at 0x412ae0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x425f18
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
jne 0x412b28
xor eax, eax
jmp 0x412d13
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x412b53
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x412b53
lea eax, [edi - 1]
mov dword [edx], eax
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov byte [edx], bl
jmp 0x412d11
cmp dword [esi + 0x50], 0
jne 0x412b61
or eax, 0xffffffff
jmp 0x412d13
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
lea eax, [esi + 0x44]
cmp ecx, eax
jne 0x412b7d
push dword [esi + 0x3c]
mov eax, dword [esi + 0x38]
mov ecx, esi
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 [esi + 0x40], 0
jne 0x412ba2
push dword [esi + 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 0x412d13
sub esp, 8
mov byte [esp + 0x1f], bl
lea ecx, [esp + 0x28]
call fcn.00416870
mov dword [esp + 0x48], 0
lea ebx, [ebx]
cmp dword [esp + 0x34], 0x10
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x24]
cmovae edx, dword [esp + 0x24]
lea ecx, [esp + 0x24]
cmovae ecx, dword [esp + 0x24]
add eax, edx
push eax
push ecx
mov ecx, dword [esi + 0x40]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x2b]
push eax
lea eax, [esi + 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 0x412cfa
cmp eax, 1
jg 0x412cd5
mov ebx, dword [esp + 0x34]
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x20]
cmp ebx, 0x10
mov edi, dword [esp + 0x18]
cmovae eax, ecx
sub edi, eax
je 0x412c4d
push dword [esi + 0x50]
cmp ebx, 0x10
lea eax, [esp + 0x24]
push edi
cmovae eax, ecx
push 1
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x412cfa
lea eax, [esp + 0x17]
mov byte [esi + 0x45], 1
cmp dword [esp + 0x1c], eax
jne 0x412cd0
test edi, edi
jne 0x412bc0
mov ecx, dword [esp + 0x30]
cmp ecx, 0x20
jae 0x412cfa
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x412cc5
lea edi, [ecx + 8]
push ecx
push edi
lea ecx, [esp + 0x28]
call fcn.00409460
test al, al
je 0x412bc0
cmp dword [esp + 0x34], 0x10
lea ecx, [esp + 0x20]
mov eax, dword [esp + 0x30]
xorps xmm0, xmm0
cmovae ecx, dword [esp + 0x20]
movq qword [ecx + eax], xmm0
lea eax, [esp + 0x20]
cmp dword [esp + 0x34], 0x10
mov dword [esp + 0x30], edi
cmovae eax, dword [esp + 0x20]
mov byte [eax + edi], 0
jmp 0x412bc0
push str.string_too_long
call dword [sym.imp.MSVCP120.dll_void___cdecl_std::_Xlength_error_char_const__]
mov ebx, dword [ebp + 8]
jmp 0x412cfd
cmp eax, 3
jne 0x412cfa
push dword [esi + 0x50]
movsx eax, byte [esp + 0x1b]
push eax
call dword [sym.imp.MSVCR120.dll_fputc]
add esp, 8
mov ebx, 0xffffffff
cmp eax, 0xffffffff
cmovne ebx, dword [ebp + 8]
jmp 0x412cfd
or ebx, 0xffffffff
cmp dword [esp + 0x34], 0x10
jb 0x412d11
push dword [esp + 0x20]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00423362
mov esp, ebp
pop ebp
ret 4