Function at 0x40f4e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41cbe9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov al, byte [esp + 0x28]
push ebx
xor ebx, ebx
push esi
push ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0xc], ebx
mov byte [esp + 0x10], 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 + 0x30]
mov dword [esp + 0x24], ebx
mov ecx, esi
shr ecx, 0x10
test cx, cx
je 0x40f535
lea edx, [esp + 0xc]
push esi
push edx
call fcn.00406f40
add esp, 8
jmp 0x40f587
cmp esi, ebx
je 0x40f587
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::CString_2
and esi, 0xffff
lea ecx, [esp + 0x30]
push esi
mov byte [esp + 0x28], 1
call sub.MFC42.DLL_CString::LoadStringA
test eax, eax
setne al
cmp al, bl
je 0x40f574
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.00406f40
add esp, 8
jmp 0x40f57a
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x30]
mov byte [esp + 0x24], bl
call sub.MFC42.DLL_CString::CString
push edi
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x28], 2
mov eax, dword [edx]
mov ecx, dword [esi + 8]
mov edi, eax
cmp ecx, edi
jae 0x40f5a7
mov edi, ecx
sub eax, dword [esp + 0x18]
cmp eax, edi
ja 0x40f5b5
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp edi, ebx
push ebp
jbe 0x40f604
mov eax, dword [esp + 0x1c]
push ebx
lea ecx, [esp + 0x18]
lea ebp, [eax + edi]
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 0x40f604
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x40f5de
mov esi, 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]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, edi
lea edi, [eax + edx]
mov edx, ecx
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], bl
mov edx, dword [esp + 0x18]
pop ebp
cmp edx, ebx
jne 0x40f613
mov edx, 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]
mov esi, dword [esp + 0x30]
mov cl, byte [esp + 0x34]
mov edi, edx
xor eax, eax
mov byte [esi], cl
or ecx, 0xffffffff
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
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_char_const___unsigned_int_]
mov ecx, dword [esp + 0x14]
pop edi
cmp ecx, ebx
je 0x40f672
mov al, byte [ecx - 1]
cmp al, bl
je 0x40f668
cmp al, 0xff
je 0x40f668
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
dec ecx
push ecx
call sub.MFC42.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