Function at 0x409f60
Capabilities:
Clear file content
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41b914
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x184
mov al, byte [esp + 0xf]
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea ecx, [esp + 0xc]
mov dword [esp + 0x198], ebx
push ecx
lea ecx, [esi + 0x18]
call fcn.0040cd90
mov eax, dword [esp + 0xc]
mov ecx, dword [esi + 0x1c]
cmp eax, ecx
mov dword [esp + 0x10], eax
je 0x40a172
add eax, 0xc
lea edx, [esp + 0x3c]
push eax
push 0x423918
push edx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_unsigned_short_int_const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
push 0x423914
push eax
lea eax, [esp + 0x70]
mov byte [esp + 0x1ac], 1
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
push 0x42390c
lea ecx, [esp + 0x98]
push eax
push ecx
mov byte [esp + 0x1bc], 2
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0x24
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [esp + 0x198], 3
mov ecx, dword [edx]
push ecx
push ebx
push eax
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::append_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x80]
mov byte [esp + 0x19c], 2
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x60]
mov byte [esp + 0x19c], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x19c], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x20]
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov edx, dword [ecx + 0x20]
cmp eax, edx
je 0x40a15a
add eax, 0xc
push 0x423908
lea edx, [esp + 0x30]
push eax
push edx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x78]
add ecx, 0x1c
mov byte [esp + 0x1a4], 4
push ecx
push eax
push edx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
push 0x42390c
push eax
lea eax, [esp + 0x6c]
mov byte [esp + 0x1b8], 5
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0x24
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [esp + 0x198], 6
mov edx, dword [ecx]
lea ecx, [esp + 0x1c]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::append_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x50]
mov byte [esp + 0x19c], 5
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x70]
mov byte [esp + 0x19c], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [esp + 0x30]
mov byte [esp + 0x198], bl
cmp eax, ebx
je 0x40a134
mov cl, byte [eax - 1]
cmp cl, bl
je 0x40a128
cmp cl, 0xff
je 0x40a128
dec cl
mov byte [eax - 1], cl
jmp 0x40a134
add eax, 0xfffffffe
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.0040d670
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmp eax, dword [ecx + 0x20]
jne 0x40a078
lea ecx, [esp + 0x10]
call fcn.0040d6c0
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x1c]
cmp eax, ecx
jne 0x409fbc
push 0x4238fc
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov esi, eax
add esp, 4
mov eax, dword [edx]
mov edx, dword [esp + 0x24]
sub eax, edx
cmp eax, esi
ja 0x40a19a
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp esi, ebx
push edi
jbe 0x40a1db
mov ecx, dword [esp + 0x28]
push ebx
lea edi, [ecx + esi]
lea ecx, [esp + 0x24]
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x40a1db
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
push esi
push 0x4238fc
lea ecx, [edx + eax*2]
push ecx
call fcn.0040f1a0
add esp, 0xc
lea ecx, [esp + 0x20]
push edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
ja 0x40a20a
mov edx, dword [esp + 0x1a4]
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x40a267
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x91]
mov byte [esp + 0x90], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1a4]
push ebx
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
lea eax, [esp + 0x98]
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0x200
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push 0x80
push 2
push ebx
push 1
lea edx, [esp + 0xa4]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a2ba
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x10]
push ebx
push eax
push 2
push 0x4238f8
push esi
mov dword [esp + 0x24], ebx
call edi
mov eax, dword [esp + 0x24]
cmp eax, ebx
jne 0x40a295
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push ebx
push ecx
lea ecx, [edx + edx]
push ecx
push eax
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, 1
mov ecx, dword [esp + 0x24]
pop edi
cmp ecx, ebx
je 0x40a2e1
mov al, byte [ecx - 1]
cmp al, bl
je 0x40a2d5
cmp al, 0xff
je 0x40a2d5
dec al
mov byte [ecx - 1], al
jmp 0x40a2e1
add ecx, 0xfffffffe
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x190]
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x190
ret 4