Function at 0x409b40
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x444029
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [esp + 0x30]
xor ebx, ebx
push ebx
lea ecx, [esp + 0x10]
mov al, byte [esi]
mov dword [esp + 0xc], ebx
mov byte [esp + 0x10], 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_]
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 edx, dword [ecx]
lea ecx, [esp + 0xc]
push edx
push ebx
push esi
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__::assign_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_]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
cmp eax, ebx
jne 0x409bf7
mov esi, dword [esp + 0x2c]
mov al, byte [esp + 0xc]
push ebx
mov ecx, esi
mov byte [esi], 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_]
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]
lea eax, [esp + 0xc]
mov edx, dword [ecx]
mov ecx, esi
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__::assign_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_]
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x409cd0
mov al, byte [ecx - 1]
cmp al, bl
je 0x409cc4
cmp al, 0xff
je 0x409cc4
dec al
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
lea esi, [eax - 1]
cmp eax, esi
ja 0x409c08
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xran_void_]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov si, word [ecx + esi*2]
cmp si, 0x5c
je 0x409c6f
cmp si, 0x2f
je 0x409c6f
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 ecx, dword [edx]
sub ecx, eax
cmp ecx, 1
ja 0x409c35
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [esp + 0x14]
lea esi, [eax + 1]
push ebx
push esi
lea ecx, [esp + 0x14]
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 0x409c6f
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push 1
push edx
lea edx, [ecx + eax*2]
push edx
call fcn.00407360
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], esi
add esp, 0xc
mov word [eax + esi*2], bx
mov esi, dword [esp + 0x2c]
mov cl, byte [esp + 0xc]
mov byte [esi], cl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
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]
lea ecx, [esp + 0xc]
mov eax, dword [edx]
push eax
push ebx
push ecx
mov ecx, esi
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__::assign_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_]
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x409cd0
mov al, byte [ecx - 1]
cmp al, bl
je 0x409cc4
cmp al, 0xff
je 0x409cc4
dec al
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret