Function at 0x401990
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x406c44
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
or eax, 0xffffffff
xor ebx, ebx
mov dword [esi + 0x18], eax
mov dword [esp + 0x28], ebx
mov dword [esi], 0x4082a4
mov dword [esi + 0xc], ebx
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x10], ebx
mov al, byte [esp + 0x30]
lea edi, [esi + 0xd4]
push ebx
mov ecx, edi
mov byte [esp + 0x2c], 1
mov byte [edi], 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_]
push 0x40b1d0
mov byte [esp + 0x2c], 2
mov dword [esi], 0x4082ac
mov dword [esi + 8], 1
call sub.MSVCRT.dll_strlen
add esp, 4
mov ebp, eax
mov ecx, edi
push 1
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 0x401a39
mov eax, dword [edi + 4]
push ebp
push 0x40b1d0
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi + 4]
add esp, 0xc
add eax, ebp
mov dword [edi + 8], ebp
mov byte [eax], bl
push 0x38
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, ebx
mov byte [esp + 0x28], 3
je 0x401adb
mov cl, byte [esp + 0x30]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x2c], esp
push ebx
mov byte [ebp], cl
mov ecx, 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_]
push 0x40b1c4
call sub.MSVCRT.dll_strlen
add esp, 4
mov ecx, ebp
mov dword [esp + 0x20], eax
push 1
push eax
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 0x401ab2
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 4]
push edx
push 0x40b1c4
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov dword [ebp + 8], eax
mov ebp, dword [ebp + 4]
add ebp, eax
mov byte [ebp], bl
sub esp, 0x10
lea eax, [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
mov byte [esp + 0x4c], 4
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [esp + 0x34]
mov byte [esp + 0x48], 3
call fcn.00401350
jmp 0x401add
xor eax, eax
sub esp, 0x10
mov dword [esi + 0xe4], eax
mov dl, byte [edi]
mov ecx, esp
mov dword [esp + 0x2c], esp
mov byte [esp + 0x38], 2
mov byte [ecx], dl
mov dword [ecx + 4], ebx
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], ebx
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 edx, dword [eax]
push edx
push ebx
push edi
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 ecx, dword [esi + 0xe4]
call fcn.00401650
lea ecx, [esi + 0x28]
push 2
push ecx
call eax
test eax, eax
je 0x401b41
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push 0x40b19c
push edx
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
add esp, 0xc
mov ecx, dword [esp + 0x34]
cmp ecx, ebx
je 0x401b65
mov al, byte [ecx - 1]
cmp al, bl
je 0x401b5b
cmp al, 0xff
je 0x401b5b
dec al
mov byte [ecx - 1], al
jmp 0x401b65
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x20]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1c
ret 0x10