Function at 0x10018990
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10027366
mov eax, dword fs:[0]
push eax
sub esp, 0xf8
mov eax, dword [0x10037018]
xor eax, esp
mov dword [esp + 0xf0], eax
push ebx
push esi
push edi
mov eax, dword [0x10037018]
xor eax, esp
push eax
lea eax, [esp + 0x108]
mov dword fs:[0], eax
cmp byte [0x10038344], 0
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], esi
je 0x10018d35
push 0x10038298
call dword [sym.imp.pthreadVC2.dll_pthread_mutex_lock]
add esp, 4
lea eax, [esp + 0x1c]
push eax
call fcn.10019510
mov dword [esp + 0x110], 0
mov eax, dword [0x10038348]
mov ecx, dword [eax + 4]
mov edi, dword [ecx]
cmp edi, ecx
je 0x10018c67
jmp 0x10018a24
mov esi, dword [esp + 0x14]
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x30]
push 0x1002b07c
push ecx
lea eax, [edi + 0x10]
push 0x1002b7cc
push ecx
push eax
push ecx
push 0x1002b7d0
push edx
lea eax, [esp + 0x4c]
push 0x1002b7d4
push eax
call fcn.100078f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.100078f0
add esp, 0xc
push eax
call fcn.1001a4d0
add esp, 0xc
push eax
call fcn.100078f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.100078f0
add esp, 8
lea ecx, [esp + 0xe4]
lea eax, [esp + 0x1c]
call fcn.100195b0
mov byte [esp + 0x110], 1
test esi, esi
jne 0x10018abc
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea ecx, [esp + 0xe4]
push ecx
push edx
call fcn.1001a4d0
add esp, 8
jmp 0x10018ae9
cmp dword [esp + 0xf8], 0x10
mov eax, dword [esp + 0xe4]
jae 0x10018ad4
lea eax, [esp + 0xe4]
mov ecx, dword [esp + 0xf4]
push esi
push ecx
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 4]
push 0
push 0
lea ecx, [esp + ecx + 0x24]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
mov ebx, 0xf
xor esi, esi
mov eax, 0x10029520
lea ecx, [esp + 0xc8]
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xd8], 0
mov byte [esp + 0xc8], 0
call fcn.10001c80
mov byte [esp + 0x110], 2
test byte [esp + 0x74], 1
je 0x10018b4f
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor esi, esi
push esi
push esi
push esi
lea ecx, [esp + 0x40]
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov ecx, dword [esp + 0x48]
mov dword [ecx], esi
mov edx, dword [esp + 0x58]
mov dword [edx], esi
mov eax, dword [esp + 0x68]
mov dword [eax], esi
and dword [esp + 0x74], 0xfffffffe
cmp dword [esp + 0xdc], 0x10
mov ecx, dword [esp + 0xc8]
jae 0x10018b8d
lea ecx, [esp + 0xc8]
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x70], esi
cmp eax, esi
je 0x10018baf
push ecx
mov ebx, eax
lea esi, [esp + 0x38]
call fcn.1001a300
mov ebx, 0xf
xor esi, esi
cmp dword [esp + 0xdc], 0x10
jb 0x10018bca
mov ecx, dword [esp + 0xc8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov byte [esp + 0x110], 0
cmp dword [esp + 0xf8], 0x10
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xd8], esi
mov byte [esp + 0xc8], 0
jb 0x10018c03
mov edx, dword [esp + 0xe4]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp byte [edi + 0x39], 0
mov dword [esp + 0xf8], ebx
mov dword [esp + 0xf4], esi
mov byte [esp + 0xe4], 0
jne 0x10018c59
mov eax, dword [edi + 8]
cmp byte [eax + 0x39], 0
jne 0x10018c3e
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x39], 0
jne 0x10018c59
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x39], 0
je 0x10018c32
jmp 0x10018c59
mov eax, dword [edi + 4]
cmp byte [eax + 0x39], 0
jne 0x10018c57
cmp edi, dword [eax + 8]
jne 0x10018c57
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x39], 0
je 0x10018c47
mov edi, eax
mov eax, dword [0x10038348]
cmp edi, dword [eax + 4]
jne 0x10018a20
push 0x10038298
call dword [sym.imp.pthreadVC2.dll_pthread_mutex_unlock]
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x80]
add esp, 4
mov dword [esp + 0x14], ecx
mov dword [esp + eax + 0x1c], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov ebx, 3
mov dword [esp + 0x110], ebx
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x34], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov byte [esp + 0x110], 4
test byte [esp + 0x74], 1
je 0x10018cca
mov edx, dword [esp + 0x44]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push 0
push 0
push 0
lea ecx, [esp + 0x40]
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [esp + 0x48]
mov dword [eax], 0
mov ecx, dword [esp + 0x58]
mov dword [ecx], 0
mov edx, dword [esp + 0x68]
mov dword [edx], 0
and dword [esp + 0x74], 0xfffffffe
lea ecx, [esp + 0x34]
mov dword [esp + 0x70], 0
mov byte [esp + 0x110], bl
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [esp + 0x34]
mov dword [esp + 0x110], 0xffffffff
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [esp + 0x7c]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, dword [esp + 0x108]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf0]
xor ecx, esp
call fcn.100256d0
mov esp, ebp
pop ebp
ret