Function at 0x405930
Capabilities:
Create thread

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x406939
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x405b57
mov dword [0x40a5bc], eax
lea eax, [esp + 4]
push eax
call fcn.00405040
add esp, 4
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 dword [esp + 0x1c], ebx
mov edx, dword [ecx]
mov ecx, 0x40a4d8
push edx
push ebx
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_]
mov eax, dword [esp + 8]
mov dword [esp + 0x1c], 0xffffffff
cmp eax, ebx
je 0x4059b0
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4059a7
cmp al, 0xff
je 0x4059a7
dec al
mov byte [ecx], al
jmp 0x4059b0
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
push ebp
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], ebx
mov ebp, ecx
mov ecx, 0x40a4f8
mov dword [esp + 0x1c], ebx
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebp
jae 0x4059e6
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edi, dword [0x40a4fc]
cmp edi, ebx
je 0x405a12
mov al, byte [edi - 1]
cmp al, bl
je 0x405a12
cmp al, 0xff
je 0x405a12
cmp ebp, ebx
jne 0x405a40
dec al
push ebx
mov ecx, 0x40a4f8
mov byte [edi - 1], 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_]
jmp 0x405a71
cmp ebp, ebx
jne 0x405a25
push 1
mov ecx, 0x40a4f8
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x405a71
mov eax, dword [0x40a504]
cmp eax, 0x1f
ja 0x405a33
cmp eax, ebp
jae 0x405a52
push 1
mov ecx, 0x40a4f8
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 ebp
mov ecx, 0x40a4f8
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [0x40a4fc]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x40a4fc]
mov dword [0x40a500], ebp
mov byte [ecx + ebp], bl
mov esi, dword [esp + 0x38]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, 0x40a518
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebp
jae 0x405a98
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edi, dword [0x40a51c]
cmp edi, ebx
je 0x405ac4
mov al, byte [edi - 1]
cmp al, bl
je 0x405ac4
cmp al, 0xff
je 0x405ac4
cmp ebp, ebx
jne 0x405af2
dec al
push ebx
mov ecx, 0x40a518
mov byte [edi - 1], 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_]
jmp 0x405b22
cmp ebp, ebx
jne 0x405ad7
push 1
mov ecx, 0x40a518
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x405b22
mov eax, dword [0x40a524]
cmp eax, 0x1f
ja 0x405ae5
cmp eax, ebp
jae 0x405b04
push 1
mov ecx, 0x40a518
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 ebp
mov ecx, 0x40a518
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [0x40a51c]
mov ecx, ebp
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 [0x40a51c]
mov dword [0x40a520], ebp
mov byte [eax + ebp], bl
mov cx, word [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
push ebx
push ebx
push ebx
push 0x405b70
push ebx
push ebx
mov word [0x40a5a4], cx
mov dword [0x40a5b4], edx
mov dword [0x40a5b8], eax
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret