Function at 0x4022a0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x403184
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x778
mov al, byte [esp + 3]
push ebp
push esi
mov dword [esp + 0xc], ecx
push edi
push 0
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x24]
push 0
push ecx
mov dword [esp + 0x794], 0
call fcn.00402a00
add esp, 8
test al, al
jne 0x402310
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x790], 0xffffffff
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 0x4024d0
lea edx, [esp + 0x14]
push str.index.dat
push edx
call fcn.00402eb0
add esp, 8
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x78c], 1
mov edx, dword [ecx]
lea ecx, [esp + 0x24]
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x18]
mov byte [esp + 0x78c], 0
test eax, eax
je 0x40236d
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402364
cmp al, 0xff
je 0x402364
dec al
mov byte [ecx], al
jmp 0x40236d
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, byte [esp + 0xf]
push 0
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x43bbc4
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
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 0x4023c8
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, 0x43bbc4
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 [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], 0
lea ecx, [esp + 0x14]
lea edx, [esp + 0x24]
push ecx
push edx
mov byte [esp + 0x794], 2
call fcn.00402870
mov ebp, eax
mov eax, dword [esp + 0x20]
add esp, 8
mov byte [esp + 0x78c], 0
test eax, eax
je 0x402411
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402408
cmp al, 0xff
je 0x402408
dec al
mov byte [ecx], al
jmp 0x402411
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
test ebp, ebp
jne 0x40243e
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x4024d0
mov al, byte [ecx - 1]
test al, al
je 0x4024c6
cmp al, 0xff
je 0x4024c6
dec al
mov byte [ecx - 1], al
jmp 0x4024d0
mov eax, dword [esp + 0x10]
mov ecx, 0x1d4
lea edi, [esp + 0x34]
lea esi, [eax + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [ecx + 0xeac]
test al, al
je 0x402471
lea edx, [esp + 0x34]
push edx
call fcn.004024f0
mov dword [esp + 0x780], 0xffddee11
push ebp
push 0x750
lea eax, [esp + 0x3c]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push ebp
mov esi, eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [esp + 0x3c]
add esp, 0x14
cmp esi, 0x750
jne 0x402419
test ecx, ecx
je 0x4024c2
mov al, byte [ecx - 1]
test al, al
je 0x4024b8
cmp al, 0xff
je 0x4024b8
dec al
mov byte [ecx - 1], al
mov al, 1
jmp 0x4024d2
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, 1
jmp 0x4024d2
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor al, al
mov ecx, dword [esp + 0x784]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x784
ret