Function at 0x4722e0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x47a9d1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
mov al, byte [esp + 0x40]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
push 0
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], 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 esi, dword [esp + 0x50]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [esp + 0x14]
push ebx
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 0x472354
mov edi, dword [esp + 0x14]
mov ecx, ebx
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov eax, dword [ebp + 0x18]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x48], ebx
jle 0x472388
mov edi, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
xor esi, esi
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x10]
add eax, esi
push ecx
push eax
call edi
add esp, 8
test al, al
jne 0x472388
mov eax, dword [ebp + 0x18]
inc ebx
add esi, 0x20
cmp ebx, eax
jl 0x472369
mov eax, dword [ebp + 0x18]
cmp ebx, eax
jne 0x472422
mov dl, byte [esp + 0x50]
inc eax
push 0
lea ecx, [esp + 0x24]
mov dword [ebp + 0x18], eax
mov byte [esp + 0x24], dl
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 eax, dword [ebp + 8]
mov esi, dword [ebp + 0x18]
lea edi, [ebp + 4]
mov byte [esp + 0x48], 1
test eax, eax
jne 0x4723c1
xor ecx, ecx
jmp 0x4723c9
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 5
cmp ecx, esi
jae 0x4723f2
test eax, eax
jne 0x4723d5
xor ecx, ecx
jmp 0x4723dd
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 5
mov eax, dword [edi + 8]
lea edx, [esp + 0x20]
sub esi, ecx
push edx
push esi
push eax
mov ecx, edi
call fcn.00472e90
jmp 0x472411
mov ecx, edi
call fcn.00472e70
cmp esi, eax
jae 0x472411
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
shl esi, 5
add esi, ecx
push eax
push esi
mov ecx, edi
call fcn.004732d0
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x4c], 0
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 eax, dword [ebp + 8]
lea edx, [esp + 0x10]
shl ebx, 5
add ebx, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, ebx
mov ecx, dword [eax]
push ecx
push 0
push edx
mov ecx, esi
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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x5c]
mov dword [esi + 0x10], eax
mov ecx, dword [ebp + 0x1c]
mov dword [esi + 0x18], edx
mov dword [esi + 0x14], ecx
mov dword [esi + 0x1c], edi
mov eax, ecx
mov ecx, dword [ebp]
push 0
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [ebp]
mov eax, dword [esp + 0x60]
push edx
push 1
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x1c
cmp eax, 1
je 0x4724b1
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4724ad
mov al, byte [ecx - 1]
test al, al
je 0x4724a3
cmp al, 0xff
je 0x4724a3
dec al
mov byte [ecx - 1], al
xor al, al
jmp 0x4724df
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor al, al
jmp 0x4724df
mov ecx, dword [ebp + 0x1c]
add ecx, edi
mov dword [ebp + 0x1c], ecx
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4724dd
mov al, byte [ecx - 1]
test al, al
je 0x4724d3
cmp al, 0xff
je 0x4724d3
dec al
mov byte [ecx - 1], al
jmp 0x4724dd
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c
ret 0x14