Function at 0x6642ef50
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags
Get process heap force flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x24], eax
movzx eax, dx
test dx, dx
je 0x6642f1b8
mov dword [esp], eax
call fcn.664253a0
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x6642efb2
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x40]
test eax, eax
jne 0x6642f1d0
test byte [0x66444974], 8
jne 0x6642f241
mov eax, dword [ebp - 0x2c]
cmp word [eax + 0x24], 0
jne 0x6642efc8
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
mov eax, dword [ebp - 0x24]
mov edi, eax
shr edi, 0x10
test edi, edi
jne 0x6642f29d
mov eax, dword [ebp - 0x1c]
shr eax, 0x10
mov dword [ebp - 0x28], eax
test eax, eax
je 0x6642f433
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0x23
je 0x6642f41e
xor edi, edi
mov esi, dword [ebp - 0x2c]
movzx eax, word [esi + 0x24]
lea ecx, [esi + eax + 2]
movzx edx, word [ecx]
mov dword [ebp - 0x38], ecx
test dx, dx
je 0x6642f441
mov eax, dword [ebp - 0x24]
and ah, 0x7f
mov dword [ebp - 0x34], eax
jmp 0x6642f039
mov ecx, dword [ebp - 0x38]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*4 + 8]
movzx edx, word [eax]
mov dword [ebp - 0x38], eax
test dx, dx
je 0x6642f632
mov eax, dword [ebp - 0x38]
movzx eax, word [eax + 2]
cmp dx, 0x800f
jne 0x6642f020
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x40], eax
add edx, 8
mov dword [ebp - 0x30], edx
test eax, eax
jne 0x6642f0d4
jmp 0x6642f6d7
test edi, edi
jne 0x6642f180
cmp dword [ebp - 0x34], eax
jne 0x6642f180
movzx eax, word [ebx + 4]
test ax, ax
js 0x6642f340
mov edx, dword [ebp - 0x28]
test edx, edx
jne 0x6642f180
mov edx, dword [ebp - 0x1c]
and edx, 0x7fff
cmp edx, eax
jne 0x6642f180
test byte [0x66444974], 8
jne 0x6642f380
mov eax, dword [ebp - 0x20]
mov edx, dword [ebx + 2]
mov dword [esp], eax
mov dword [ebp - 0x3c], edx
call sym.krnl386.exe16_FreeResource16
mov edx, dword [ebp - 0x3c]
sub esp, 4
test edx, edx
jne 0x6642f570
add dword [ebp - 0x30], 0xc
sub dword [ebp - 0x40], 1
je 0x6642f1a7
test byte [0x66444974], 8
jne 0x6642f3e0
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
sub eax, edx
movzx eax, ax
mov dword [esp + 4], eax
movzx eax, word [edx + 0x48]
mov dword [esp], eax
call sym.krnl386.exe16_LoadResource16
movzx eax, ax
sub esp, 8
mov dword [ebp - 0x20], eax
test byte [0x66444974], 8
jne 0x6642f3b0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.krnl386.exe16_K32WOWGlobalLock16
sub esp, 4
mov dword [esp], eax
call sym.krnl386.exe16_MapSL
sub esp, 4
mov ebx, eax
test eax, eax
je 0x6642f18b
cmp word [ebx], 0
je 0x6642f18b
lea esi, [esi]
nop
test byte [0x66444974], 8
jne 0x6642f2e8
movzx eax, word [ebx + 2]
test ax, ax
jns 0x6642f060
test edi, edi
je 0x6642f180
lea eax, [ebx + 6]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__stricmp]
test eax, eax
je 0x6642f071
lea esi, [esi]
movzx eax, word [ebx]
add ebx, eax
cmp word [ebx], 0
jne 0x6642f140
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.krnl386.exe16_FreeResource16
add dword [ebp - 0x30], 0xc
sub esp, 4
sub dword [ebp - 0x40], 1
jne 0x6642f0d4
mov eax, dword [ebp - 0x38]
movzx eax, word [eax + 2]
jmp 0x6642f020
call fcn.66432cc0
movzx eax, word [eax + 0x1e]
jmp 0x6642ef7e
mov edi, dword [ebp - 0x24]
mov dword [esp], eax
mov esi, dword [ebp - 0x1c]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov esi, edi
call dword [sym.imp.kernel32.dll_FindResourceA]
mov ebx, eax
mov eax, edi
sub esp, 0xc
shr eax, 0x10
xor edi, edi
test eax, eax
mov eax, dword [ebp - 0x2c]
cmove edi, esi
mov esi, dword [eax + 0x4c]
test esi, esi
je 0x6642f593
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
test ecx, ecx
jle 0x6642f699
xor eax, eax
jmp 0x6642f22b
add eax, 1
cmp eax, ecx
je 0x6642f543
cmp ebx, dword [edx + eax*8]
jne 0x6642f220
lea esp, [ebp - 0x10]
add eax, 1
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
mov eax, dword [ebp - 0x24]
call fcn.6642d730
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.6642d730
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax + 0x48]
mov dword [esp + 0xc], str.module_04x_name_s_type_s_n
mov dword [esp + 8], str.FindResource16
mov dword [esp + 4], 0x66444974
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.6642d470
mov eax, dword [ebp - 0x2c]
cmp word [eax + 0x24], 0
je 0x6642efb2
jmp 0x6642efc8
cmp byte [eax], 0x23
je 0x6642f682
mov eax, dword [ebp - 0x1c]
shr eax, 0x10
mov dword [ebp - 0x28], eax
test eax, eax
je 0x6642eff7
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0x23
jne 0x6642eff7
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
mov dword [ebp - 0x28], 0
movzx eax, ax
mov dword [ebp - 0x1c], eax
jmp 0x6642eff7
lea esi, [ebx + 6]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
lea eax, [ebx + eax + 7]
mov dword [esp + 0x1c], eax
movzx eax, word [ebx + 4]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
movzx eax, word [ebx + 2]
mov dword [esp + 0xc], str.__type_04x__s_id_04x__s_n
mov dword [esp + 8], str.NE_FindNameTableId
mov dword [esp + 4], 0x66444974
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.6642d470
jmp 0x6642f14d
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x6642f180
lea eax, [ebx + 6]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strlen]
lea eax, [ebx + eax + 7]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__stricmp]
test eax, eax
jne 0x6642f180
test byte [0x66444974], 8
je 0x6642f0a7
mov dword [esp + 0xc], str.__Found__n
mov dword [esp + 8], str.NE_FindNameTableId
mov dword [esp + 4], 0x66444974
mov dword [esp], 3
call fcn.6642d470
jmp 0x6642f0a7
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__04x__n
mov dword [esp + 8], str.WIN16_LockResource16
mov dword [esp + 4], 0x66444974
mov dword [esp], 3
call fcn.6642d470
jmp 0x6642f112
mov eax, dword [ebp - 0x30]
movzx eax, word [eax + 6]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x38]
movzx eax, word [eax]
mov dword [esp + 0xc], str.NameTable_entry:_type_04x_id_04x_n
mov dword [esp + 8], str.NE_FindNameTableId
mov dword [esp + 4], 0x66444974
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.6642d470
jmp 0x6642f0e1
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
movzx eax, ax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], 0
movzx eax, word [eax + 0x24]
mov edi, dword [ebp - 0x2c]
add edi, eax
lea edx, [edi + 2]
lea esi, [esi]
mov ecx, dword [ebp - 0x24]
mov eax, edi
call fcn.6642d500
mov edx, eax
test eax, eax
je 0x6642efb2
lea ebx, [eax + 8]
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x6642f508
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strlen]
mov edx, dword [ebp - 0x20]
mov ecx, eax
movzx esi, word [edx + 2]
test esi, esi
je 0x6642f58f
movzx eax, al
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], eax
jmp 0x6642f4ac
add ebx, 0xc
sub esi, 1
je 0x6642f530
movzx eax, word [ebx + 6]
test ax, ax
js 0x6642f4a0
add eax, edi
cmp cl, byte [eax]
jne 0x6642f4a0
mov byte [ebp - 0x20], cl
mov ecx, dword [ebp - 0x30]
add eax, 1
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 4], ecx
call dword [sym.imp.ucrtbase.dll__strnicmp]
movzx ecx, byte [ebp - 0x20]
test eax, eax
jne 0x6642f4a0
test byte [0x66444974], 8
jne 0x6642f602
mov eax, ebx
sub ax, word [ebp - 0x2c]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
movzx ecx, word [ebp - 0x1c]
movzx esi, word [edx + 2]
or cx, 0x8000
mov eax, esi
test esi, esi
jne 0x6642f528
jmp 0x6642f537
add ebx, 0xc
sub eax, 1
je 0x6642f537
cmp cx, word [ebx + 6]
jne 0x6642f520
jmp 0x6642f4e0
mov edx, dword [ebp - 0x34]
movzx esi, word [edx + 2]
lea eax, [esi + esi*2]
lea edx, [edx + eax*4 + 8]
jmp 0x6642f450
cmp dword [esi], eax
je 0x6642f63e
mov dword [edx + ecx*8], ebx
mov edx, dword [esi + 4]
mov eax, dword [esi + 8]
mov word [eax + edx*8 + 4], di
mov eax, dword [esi + 4]
add eax, 1
mov dword [esi + 4], eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
movzx eax, dx
shr edx, 0x10
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
movzx eax, word [eax + 0x24]
jmp 0x6642f441
xor esi, esi
jmp 0x6642f537
mov dword [esp + 8], 0xc
mov dword [esp + 4], 8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x6642f5cc
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x4c], esi
jmp 0x6642f208
test byte [0x66444974], 2
je 0x6642efb2
mov dword [esp + 0xc], str.Cannot_allocate_HRSRC_map_n
mov dword [esp + 8], str.MapHRsrc32To16
mov dword [esp + 4], 0x66444974
mov dword [esp], 1
call fcn.6642d470
jmp 0x6642efb2
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], str.____Found_id__p_n
mov dword [esp + 8], str.FindResource16
mov dword [esp + 4], 0x66444974
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.6642d470
jmp 0x6642f4ed
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax + 0x24]
jmp 0x6642f441
lea eax, [eax*8 + 0x80]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 8
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov edx, eax
test edx, edx
je 0x6642f6de
add dword [esi], 0x10
mov dword [esi + 8], edx
mov ecx, dword [esi + 4]
jmp 0x6642f54b
add eax, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_atoi]
movzx eax, ax
mov dword [ebp - 0x24], eax
jmp 0x6642efd8
mov eax, dword [esi]
cmp eax, ecx
jne 0x6642f54b
lea eax, [eax*8 + 0x80]
test edx, edx
jne 0x6642f645
mov dword [esp + 8], eax
mov dword [esp + 4], 8
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edx, eax
jmp 0x6642f670
xor eax, eax
jmp 0x6642f020
test byte [0x66444974], 2
je 0x6642efb2
mov dword [esp + 0xc], str.Cannot_grow_HRSRC_map_n
jmp 0x6642f5e1