Function at 0x410c80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x510458
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x410cbb
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x410cef
mov eax, ecx
mov ecx, dword [edi + 0x34]
mov edx, dword [ecx]
add edx, eax
cmp eax, edx
jae 0x410cef
mov ecx, edi
call dword [sym.imp.MSVCP100.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov byte [eax], bl
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x54], 0
jne 0x410d0a
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x10]
mov eax, dword [eax]
lea ecx, [edi + 0x48]
cmp eax, ecx
jne 0x410d27
mov eax, dword [edi + 0x40]
mov edx, dword [edi + 0x3c]
push eax
push eax
push edx
mov ecx, edi
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp dword [edi + 0x44], 0
jne 0x410d57
mov edi, dword [edi + 0x54]
movsx eax, bl
push edi
push eax
call dword [sym.imp.MSVCR100.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x410cf5
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push esi
lea esi, [ebp - 0x34]
mov byte [ebp - 0xd], bl
call fcn.00411770
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
mov ecx, eax
cmp edx, 0x10
jae 0x410d7c
lea ecx, [ebp - 0x34]
mov eax, ecx
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ebp - 0x24]
add edx, ecx
push edx
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [edi + 0x44]
lea edx, [ebp - 0xd]
push edx
lea eax, [edi + 0x4c]
push eax
call dword [sym.imp.MSVCP100.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 0x410e84
cmp eax, 1
jg 0x410e19
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
mov ecx, eax
cmp edx, 0x10
jae 0x410dbd
lea ecx, [ebp - 0x34]
mov esi, dword [ebp - 0x14]
sub esi, ecx
je 0x410deb
cmp edx, 0x10
jae 0x410dcc
lea eax, [ebp - 0x34]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x410e84
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0xd]
mov byte [edi + 0x49], 1
cmp dword [ebp - 0x18], ecx
jne 0x410e60
test esi, esi
jne 0x410d70
cmp dword [ebp - 0x24], 0x20
jae 0x410e84
push esi
lea ebx, [esi + 8]
lea esi, [ebp - 0x34]
call fcn.00411840
mov ebx, dword [ebp + 8]
jmp 0x410d6a
cmp eax, 3
jne 0x410e84
mov edi, dword [edi + 0x54]
movsx edx, byte [ebp - 0xd]
push edi
push edx
call dword [sym.imp.MSVCR100.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x410e39
mov edi, ebx
jmp 0x410e3c
or edi, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x34]
call fcn.004150e0
pop esi
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x34]
call fcn.004150e0
pop esi
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x34]
call fcn.004150e0
mov ecx, dword [ebp - 0xc]
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4