Function at 0x405b10
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5675dd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
mov al, byte [esp + 0x50]
push ebp
push esi
xor ebp, ebp
push edi
push ebp
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], 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 edx, dword [esp + 0x5c]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x24]
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_char_const___unsigned_int_]
mov cl, byte [esp + 0x5c]
push ebp
mov byte [esp + 0x10], cl
lea ecx, [esp + 0x10]
mov dword [esp + 0x58], ebp
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 dl, byte [esp + 0x5c]
push ebp
lea ecx, [esp + 0x30]
mov byte [esp + 0x58], 1
mov byte [esp + 0x30], 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 edi, 0x5ce8d8
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x54], 2
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebp
push 0x5ce8d8
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov esi, eax
lea eax, [esp + 0x3c]
push esi
push ebp
push eax
lea ecx, [esp + 0x28]
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__::substr_unsigned_int__unsigned_int_]
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 + 0x54], 3
mov edx, dword [ecx]
lea ecx, [esp + 0xc]
push edx
push ebp
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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x58], 2
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 [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp esi, dword [eax]
je 0x405c3a
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x3c]
sub ecx, esi
inc esi
push ecx
push esi
push edx
lea ecx, [esp + 0x28]
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__::substr_unsigned_int__unsigned_int_]
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 + 0x54], 4
mov edx, dword [ecx]
lea ecx, [esp + 0x2c]
push edx
push ebp
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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x58], 2
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 [esp + 0x10]
cmp eax, ebp
jne 0x405c47
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [esp + 0x34]
add esp, 4
cmp ecx, ebp
mov esi, eax
je 0x405c77
mov al, byte [ecx - 1]
test al, al
je 0x405c6d
cmp al, 0xff
je 0x405c6d
dec al
mov byte [ecx - 1], al
jmp 0x405c77
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], ebp
cmp ecx, ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
je 0x405ca7
mov al, byte [ecx - 1]
test al, al
je 0x405c9d
cmp al, 0xff
je 0x405c9d
dec al
mov byte [ecx - 1], al
jmp 0x405ca7
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], ebp
cmp ecx, ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
je 0x405ce9
mov al, byte [ecx - 1]
test al, al
je 0x405cdf
cmp al, 0xff
je 0x405cdf
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebp
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
add esp, 0x4c
ret
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x4c]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x4c
ret