Function at 0x67821f60
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x679813f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
xor ebx, ebx
mov dword [esp + 8], 0x67996938
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x30]
lea eax, [esp + 8]
push eax
push edx
mov dword [esp + 0x2c], ebx
call sym.MfcHlpr520.dll_private:_void___thiscall_CMHPResourceManagerXML::AddMenuItems_class_CMHPPropExchange___struct_CMHPResourceManagerXML::MENUTEMPLATEINFO__
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x67821fd3
lea ecx, [esp + 8]
mov dword [esp + 0x24], 0xffffffff
call fcn.67822d70
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 8
push ebp
push esi
xor esi, esi
cmp eax, ebx
push edi
mov ebp, 4
jle 0x6782200e
mov eax, dword [esp + 0x18]
mov edi, dword [eax + esi*4]
mov ecx, dword [edi + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov dl, byte [edi]
add esp, 4
not dl
shr edx, 3
and edx, 2
lea eax, [edx + eax*2 + 4]
add ebp, eax
mov eax, dword [esp + 0x1c]
inc esi
cmp esi, eax
jl 0x67821fe1
lea edi, [ebp + 6]
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x10], esi
and ecx, 3
lea ebp, [esi + 4]
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], ebx
cmp eax, ebx
jle 0x678220de
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
mov ebx, dword [eax + ecx*4]
mov dx, word [ebx]
mov word [ebp], dx
mov al, byte [ebx]
test al, 0x10
je 0x67822079
mov eax, dword [ebx + 8]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
mov esi, dword [ebx + 8]
add esp, 4
lea ecx, [eax + eax + 2]
lea edi, [ebp + 2]
jmp 0x67822098
mov ax, word [ebx + 2]
mov word [ebp + 2], ax
mov ecx, dword [ebx + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov esi, dword [ebx + 8]
add esp, 4
lea ecx, [eax + eax + 2]
lea edi, [ebp + 4]
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 [ebx + 8]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
mov cl, byte [ebx]
add esp, 4
not cl
shr ecx, 3
and ecx, 2
lea eax, [ecx + eax*2 + 4]
mov ecx, dword [esp + 0x1c]
add ebp, eax
mov eax, dword [esp + 0x3c]
inc eax
cmp eax, ecx
mov dword [esp + 0x3c], eax
jl 0x67822048
mov esi, dword [esp + 0x10]
xor ebx, ebx
push esi
mov word [ebp], 0x80
call dword [sym.imp.USER32.dll_LoadMenuIndirectA]
mov ecx, dword [esp + 0x38]
push eax
call sub.MFC42.DLL_CMenu::Attach
push esi
mov dword [esp + 0x40], eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x1c]
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x30], 2
jle 0x67822142
mov ebp, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edx, dword [esp + 0x18]
mov esi, dword [edx + edi*4]
cmp esi, ebx
je 0x67822139
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x67822130
push eax
call ebp
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, eax
jl 0x6782211b
mov dword [esp + 0x14], 0x67996938
mov eax, dword [esp + 0x18]
pop edi
pop esi
cmp eax, ebx
mov dword [esp + 0x28], 3
pop ebp
je 0x67822166
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 8