Function at 0x10003230
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x22c]
push ebx
push ecx
sub esp, 0x670
mov eax, dword [ecx + 8]
mov edi, dword [ecx]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x664], eax
mov eax, dword [ecx + 0xc]
mov edx, dword [edi + 0x70]
mov dword [ebp - 0x65c], edi
mov dword [ebp - 0x668], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [ebp - 0x66c], eax
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]
mov edx, dword [edi + 0x6c]
mov dword [ebp - 0x660], eax
sub esp, 0xc
lea eax, [ebp - 0x42a]
lea esi, [esi]
movzx ecx, word [ebx]
test cx, cx
je 0x100032c6
add eax, 2
add ebx, 2
mov word [eax - 2], cx
cmp eax, esi
jne 0x100032b0
xor ecx, ecx
mov word [eax], cx
cmp word [ebp - 0x42a], 0
lea eax, [ebp - 0x42a]
je 0x10003727
nop
add eax, 2
cmp word [eax], 0
jne 0x100032e0
mov ecx, eax
lea ebx, [ebp - 0x42a]
sub ecx, ebx
sar ecx, 1
mov dword [ebp - 0x654], ecx
cmp eax, ebx
je 0x1000332a
cmp word [ebp + ecx*2 - 0x42c], 0x2f
je 0x1000332a
mov eax, 0x2f
mov word [ebp + ecx*2 - 0x42a], ax
add ecx, 1
xor eax, eax
mov dword [ebp - 0x654], ecx
mov word [ebp + ecx*2 - 0x42a], ax
xor edi, edi
mov word [ebp - 0x62a], di
cmp edx, 0xffffffff
je 0x10003676
mov dword [ebp - 0x650], 0xffffffff
lea ebx, [ebp - 0x62a]
mov dword [ebp - 0x64c], 0
mov ecx, dword [ebp - 0x65c]
xor edi, edi
mov eax, dword [ecx + 0x70]
cmp dword [ecx], 0xffffffff
mov esi, eax
je 0x100036f8
mov dword [esp + 0xc], edi
mov edi, edx
sar edi, 0x1f
mov dword [esp + 8], eax
mov esi, edi
mov edi, dword [ebp - 0x65c]
imul esi, eax
mul edx
add edx, esi
add eax, dword [edi + 0x50]
adc edx, dword [edi + 0x54]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x660]
mov dword [esp], eax
mov eax, edi
call sym.__chm_fetch_bytes.part.0
mov esi, dword [edi + 0x70]
xor edi, edi
xor edx, edi
xor eax, esi
or edx, eax
jne 0x10003736
mov eax, dword [ebp - 0x660]
lea ecx, [ebp - 0x640]
lea edx, [ebp - 0x644]
mov dword [ebp - 0x644], 0x14
mov dword [ebp - 0x648], eax
lea eax, [ebp - 0x648]
call sym.__unmarshal_pmgl_header.part.0.constprop.0
mov edi, eax
test eax, eax
je 0x100036ba
mov eax, dword [ebp - 0x65c]
mov esi, dword [ebp - 0x660]
add esi, dword [eax + 0x70]
sub esi, dword [ebp - 0x63c]
mov dword [ebp - 0x658], esi
cmp esi, dword [ebp - 0x648]
ja 0x100034b0
jmp 0x10003574
mov eax, dword [ebp - 0x21c]
or eax, dword [ebp - 0x220]
jne 0x1000349e
mov eax, dword [ebp - 0x654]
lea ecx, [ebp - 0x42a]
lea edi, [ebp - 0x214]
mov esi, dword [sym.imp.ucrtbase.dll__wcsnicmp]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp], edi
call esi
test eax, eax
jne 0x1000349e
mov eax, dword [ebp - 0x654]
cmp word [ebp + eax*2 - 0x214], 0
je 0x10003558
cmp dword [ebp - 0x650], 0xffffffff
je 0x10003590
mov eax, dword [ebp - 0x650]
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [esp + 8], eax
call esi
mov dword [ebp - 0x64c], 1
test eax, eax
jne 0x10003590
mov eax, dword [ebp - 0x658]
cmp dword [ebp - 0x648], eax
jae 0x10003574
lea edx, [ebp - 0x228]
lea eax, [ebp - 0x648]
call sym.__chm_parse_PMGL_entry
test eax, eax
je 0x100036b8
mov esi, dword [ebp - 0x64c]
test esi, esi
je 0x10003420
mov eax, dword [ebp - 0x654]
lea edi, [ebp - 0x214]
mov esi, dword [sym.imp.ucrtbase.dll__wcsnicmp]
mov dword [esp], edi
mov dword [esp + 8], eax
lea eax, [ebp - 0x42a]
mov dword [esp + 4], eax
call esi
test eax, eax
je 0x1000346c
mov ebx, dword [ebp - 0x660]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov edi, dword [ebp - 0x64c]
sub esp, 0xc
lea esp, [ebp - 0x10]
mov eax, edi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test byte [ebp - 0x664], 0x10
jne 0x10003617
lea esi, [esi]
mov dword [ebp - 0x64c], 1
mov eax, dword [ebp - 0x658]
cmp dword [ebp - 0x648], eax
jb 0x100034b0
mov edx, dword [ebp - 0x630]
cmp edx, 0xffffffff
jne 0x10003356
jmp 0x10003676
xor eax, eax
lea esi, [esi]
movzx edx, word [edi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x10003598
cmp word [ebp - 0x62a], 0
je 0x10003718
mov esi, ebx
nop
lea esi, [esi]
add esi, 2
cmp word [esi], 0
jne 0x100035c0
sub esi, ebx
sar esi, 1
mov dword [ebp - 0x650], esi
movzx ecx, word [ebp - 0x214]
test cx, cx
je 0x10003708
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x100035e8
sub eax, edi
sar eax, 1
sub eax, 1
add eax, 8
cmp word [ebp + eax*2 - 0x224], 0x2f
je 0x10003548
test byte [ebp - 0x664], 8
je 0x10003558
mov eax, 2
cmp cx, 0x2f
jne 0x10003638
movzx eax, word [ebp - 0x212]
sub eax, 0x23
cmp ax, 2
sbb eax, eax
and eax, 3
add eax, 1
test dword [ebp - 0x664], eax
je 0x10003558
mov eax, dword [ebp - 0x66c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x228]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x65c]
mov dword [esp], eax
mov eax, dword [ebp - 0x668]
call eax
test eax, eax
je 0x100036b8
cmp eax, 2
jne 0x10003558
mov ebx, dword [ebp - 0x660]
mov dword [esp + 4], 0
mov edi, 1
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, edi
sub esp, 0xc
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov edi, eax
mov ebx, dword [ebp - 0x660]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, edi
sub esp, 0xc
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
xor eax, eax
xor edx, edx
jmp 0x100033a7
mov eax, 0xffffffff
jmp 0x100035f8
mov dword [ebp - 0x650], 0
jmp 0x100035d3
mov dword [ebp - 0x654], 0
jmp 0x1000332a
mov ebx, dword [ebp - 0x660]
mov dword [esp + 4], 0
xor edi, edi
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x10003534