Function at 0x401c40
Capabilities:
Access peb ldr_data
Get kernel32 base address
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41fba7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
push ebx
push ebp
push esi
mov esi, dword [esp + 0xac]
push edi
mov edi, ecx
push esi
mov dword [esp + 0x18], edi
call fcn.00413750
mov al, byte [esp + 0x11]
lea ebx, [edi + 0xdc8]
xor ebp, ebp
mov dword [esp + 0xa8], ebp
mov byte [ebx], al
mov dword [ebx + 4], ebp
mov dword [ebx + 8], ebp
mov dword [ebx + 0xc], ebp
mov al, byte [esp + 0x11]
mov dword [edi], fcn.00401ff0
mov ecx, dword [esi + 0xddc]
push ebp
mov dword [edi + 0xddc], ecx
mov edx, dword [esi + 0xdd8]
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 1
mov dword [edi + 0xdd8], edx
mov byte [esp + 0x20], 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 cl, byte [esp + 0x11]
push ebp
mov byte [esp + 0x30], cl
lea ecx, [esp + 0x30]
mov byte [esp + 0xac], 2
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_]
lea edx, [esp + 0x11]
lea ecx, [esp + 0x48]
push edx
mov byte [esp + 0xac], 3
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::allocator_unsigned_short_int__const__]
lea eax, [esp + 0x1b]
lea ecx, [esp + 0x58]
push eax
mov byte [esp + 0xac], 4
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::allocator_unsigned_short_int__const__]
lea ecx, [esp + 0x12]
mov byte [esp + 0xa8], 5
push ecx
lea ecx, [esp + 0x84]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::allocator_unsigned_short_int__const__]
lea edx, [esp + 0x13]
lea ecx, [esp + 0x90]
push edx
mov byte [esp + 0xac], 6
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::allocator_char__const__]
mov eax, dword [edi + 0xdd8]
mov byte [esp + 0xa8], 7
cmp eax, ebp
je 0x401f40
mov eax, dword [esi + 0xdcc]
cmp eax, ebp
je 0x401f40
mov ecx, dword [esi + 0xdd0]
sub ecx, eax
mov eax, 0x3e0f83e1
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
je 0x401f40
mov ebp, dword [esi + 0xdcc]
mov eax, dword [esi + 0xdd0]
cmp ebp, eax
je 0x401f3e
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 + 0x1c]
push edx
push 0
push ebp
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 [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 edx, [ebp + 0x10]
mov ecx, dword [eax]
push ecx
push 0
push edx
lea ecx, [esp + 0x38]
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 [ebp + 0x20]
mov dword [esp + 0x3c], eax
mov ecx, dword [ebp + 0x24]
mov eax, 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 dword [esp + 0x40], ecx
mov edx, dword [ebp + 0x28]
mov dword [esp + 0x44], edx
mov ecx, dword [eax]
push ecx
lea edx, [ebp + 0x2c]
push 0
push edx
lea ecx, [esp + 0x54]
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 [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 edx, [ebp + 0x3c]
mov ecx, dword [eax]
push ecx
push 0
push edx
lea ecx, [esp + 0x64]
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 [ebp + 0x4c]
mov dword [esp + 0x68], eax
mov ecx, dword [ebp + 0x50]
mov dword [esp + 0x6c], ecx
mov edx, dword [ebp + 0x54]
mov dword [esp + 0x70], edx
mov eax, dword [ebp + 0x58]
mov dword [esp + 0x74], eax
mov ecx, dword [ebp + 0x5c]
mov eax, 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 dword [esp + 0x78], ecx
mov edx, dword [ebp + 0x60]
mov dword [esp + 0x7c], edx
mov ecx, dword [eax]
push ecx
lea edx, [ebp + 0x64]
push 0
push edx
lea ecx, [esp + 0x8c]
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 [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [ebp + 0x74]
mov ecx, dword [eax]
push ecx
push 0
push edx
lea ecx, [esp + 0x9c]
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 [ebp + 0x4c]
test eax, eax
je 0x401ea8
mov eax, dword [ebp + 0x50]
push eax
call sub.MFC42u.DLL_operatornew
mov dword [esp + 0x6c], eax
mov ecx, dword [ebp + 0x50]
mov esi, dword [ebp + 0x4c]
mov edx, ecx
mov edi, eax
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0xb0]
mov eax, dword [ebp + 0x54]
test eax, eax
je 0x401ee0
mov eax, dword [ebp + 0x58]
push eax
call sub.MFC42u.DLL_operatornew
mov dword [esp + 0x74], eax
mov ecx, dword [ebp + 0x58]
mov esi, dword [ebp + 0x54]
mov edx, ecx
mov edi, eax
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0xb0]
mov eax, dword [ebp + 0x5c]
test eax, eax
je 0x401f18
mov eax, dword [ebp + 0x60]
push eax
call sub.MFC42u.DLL_operatornew
mov dword [esp + 0x7c], eax
mov ecx, dword [ebp + 0x60]
mov esi, dword [ebp + 0x5c]
mov edx, ecx
mov edi, eax
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0xb0]
mov eax, dword [ebx + 8]
lea ecx, [esp + 0x1c]
push ecx
push 1
push eax
mov ecx, ebx
call fcn.004011b0
mov eax, dword [esi + 0xdd0]
add ebp, 0x84
cmp ebp, eax
jne 0x401d9d
xor ebp, ebp
push 1
lea ecx, [esp + 0x94]
mov byte [esp + 0xac], 0xc
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 1
lea ecx, [esp + 0x84]
mov byte [esp + 0xac], 0xb
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_]
push 1
lea ecx, [esp + 0x5c]
mov byte [esp + 0xac], 0xa
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_]
push 1
lea ecx, [esp + 0x4c]
mov byte [esp + 0xac], 9
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_]
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0xac], 8
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 [esp + 0x20]
cmp ecx, ebp
je 0x401fd0
mov al, byte [ecx - 1]
test al, al
je 0x401fc4
cmp al, 0xff
je 0x401fc4
dec al
mov byte [ecx - 1], al
jmp 0x401fd0
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0xa0]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9c
ret 4