Function at 0x491cb0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x50c0f1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x28]
cmp esi, eax
mov dword [esp + 0x20], 0
jl 0x491e66
lea ebx, [esi + 1]
test ebx, ebx
jne 0x491d2c
mov edi, dword [ebp + 4]
test edi, edi
je 0x491d1f
mov ecx, eax
dec eax
test ecx, ecx
je 0x491d0c
lea ebx, [eax + 1]
push 0
mov ecx, edi
call fcn.00492200
add edi, 0x10
dec ebx
jne 0x491cfd
mov eax, dword [ebp + 4]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [ebp + 4], 0
xor eax, eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], eax
jmp 0x491e66
mov ecx, dword [ebp + 4]
test ecx, ecx
jne 0x491d8e
mov edi, ebx
shl edi, 4
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
mov dword [ebp + 4], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x10], esi
rep stosb byte es:[edi], al
lea edi, [ebx]
mov dword [esp + 0x14], esi
test esi, esi
mov byte [esp + 0x20], 1
je 0x491d74
mov ecx, esi
call fcn.00491ef0
add esi, 0x10
dec edi
mov byte [esp + 0x20], 0
mov dword [esp + 0x10], esi
jne 0x491d60
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], ebx
jmp 0x491e62
mov edi, dword [ebp + 0xc]
cmp ebx, edi
jg 0x491dcb
cmp eax, ebx
jge 0x491db1
mov edx, ebx
sub edx, eax
shl eax, 4
add eax, ecx
push edx
push eax
call fcn.00492370
mov dword [ebp + 8], ebx
jmp 0x491e66
jle 0x491dc3
sub eax, ebx
push eax
mov eax, ebx
shl eax, 4
add eax, ecx
push eax
call fcn.00491f40
mov dword [ebp + 8], ebx
jmp 0x491e66
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x491df6
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
cmp ecx, 4
jge 0x491de9
mov ecx, 4
jmp 0x491df6
cmp ecx, 0x400
jle 0x491df6
mov ecx, 0x400
lea eax, [edi + ecx]
cmp ebx, eax
mov dword [esp + 0x10], eax
jl 0x491e05
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x10]
shl ecx, 4
push ecx
call sub.MFC42.DLL_operatornew
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 4]
shl ecx, 4
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, ebx
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x14], eax
sub edx, ecx
shl ecx, 4
add ecx, eax
push edx
push ecx
call fcn.00492370
mov eax, dword [ebp + 4]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [ebp + 4], eax
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ecx
mov esi, dword [esp + 0x28]
mov edx, dword [ebp + 4]
shl esi, 4
add esi, edx
lea edx, [esp + 0x2c]
push edx
mov ecx, esi
call fcn.004c830a
mov ax, word [esp + 0x30]
lea edx, [esp + 0x34]
mov word [esi + 4], ax
mov cx, word [esp + 0x32]
mov word [esi + 6], cx
push edx
lea ecx, [esi + 8]
call fcn.004c830a
mov ax, word [esp + 0x38]
mov word [esi + 0xc], ax
mov cx, word [esp + 0x3a]
mov word [esi + 0xe], cx
lea ecx, [esp + 0x34]
mov dword [esp + 0x20], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 0x14