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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x58]
mov ecx, dword [0x1038e48]
and dword [ebp - 0xc], 0
push ebx
push esi
mov esi, dword [0x10383d4]
shl eax, 4
push edi
mov edi, dword [eax + ecx + 0xc]
mov eax, dword [esi + 4]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
add eax, eax
mov word [ebp - 8], ax
push 1
push dword [ebp - 8]
lea eax, [edi + edi]
mov dword [ebp + 8], edi
mov dword [ebp - 4], edi
mov word [ebp + 8], ax
call fcn.01026ccb
mov edx, dword [0x1038030]
mov ecx, dword fs:[0x18]
add eax, 0xc
push eax
mov eax, dword [ecx + 0x30]
add edx, 0x300000
push edx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x10215c5
mov eax, 0xc0000017
jmp 0x102183d
mov eax, dword [esi]
mov ecx, dword [0x1038080]
imul eax, eax, 0x18
push dword [eax + ecx]
push dword [0x1038268]
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x20], eax
je 0x1021816
mov esi, dword [ebp + 0xc]
dec dword [ebp + 0x10]
mov eax, 0x300
test word [esi + 2], ax
mov eax, dword [ebp + 8]
jne 0x1021602
mov eax, edi
xor ecx, ecx
push ecx
push ecx
push ecx
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.010270a9
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x10217f0
mov ax, word [esi]
mov word [ebp - 0x18], ax
xor eax, eax
push ebx
mov word [ebp - 0x16], ax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlSizeHeap]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push dword [0x1038268]
call sub.GDI32.dll_GetStringBitmapW
mov eax, dword [ebp - 0x14]
mov di, word [ebx]
mov bx, word [ebx + 4]
add eax, 8
push eax
movzx eax, word [esi]
push 1
mov word [ebp - 0x1c], di
mov word [ebp - 0x1a], bx
push dword [ebp - 0x1c]
push eax
push dword [0x10383d4]
call fcn.010274f5
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x10216b5
movsx eax, bx
push eax
movsx eax, di
mov edi, dword [sym.imp.ntdll.dll_DbgPrintEx]
push eax
movzx eax, word [esi]
push eax
push 0x1021844
push 1
push 0x70
call edi
push 0x1009c78
push 1
push 0x70
call edi
add esp, 0x24
jmp 0x10216bb
mov edi, dword [sym.imp.ntdll.dll_DbgPrintEx]
mov ax, word [esi + 2]
mov ecx, 0x300
and ax, cx
je 0x10216dd
mov cx, word [ebp + 8]
cmp word [ebp - 8], cx
jne 0x10216fe
mov cx, word [ebp - 6]
cmp cx, word [ebp + 0xa]
jne 0x10216fe
test ax, ax
jne 0x10217ea
mov ax, word [ebp - 4]
cmp word [ebp - 0x10], ax
jne 0x10216fe
mov ax, word [ebp - 0xe]
cmp ax, word [ebp - 2]
je 0x10217ea
push 2
push dword [ebp + 8]
call fcn.01026ccb
mov edx, dword [0x1038030]
mov ecx, dword fs:[0x18]
push eax
mov eax, dword [ecx + 0x30]
add edx, 0x300000
push edx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp + 0xc], eax
test eax, eax
je 0x10217ea
mov ax, word [esi + 2]
mov ebx, 0x300
mov ecx, ebx
and ax, cx
mov ecx, dword [ebp + 8]
jne 0x102174a
mov ecx, dword [ebp - 4]
test ax, ax
mov eax, dword [ebp - 8]
jne 0x1021755
mov eax, dword [ebp - 0x10]
push dword [ebp + 0xc]
push ecx
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.01027268
mov eax, ebx
test word [esi + 2], ax
mov eax, dword [ebp + 8]
jne 0x1021777
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
push 2
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.010274f5
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x10217d3
mov cx, word [esi + 2]
and cx, bx
mov eax, dword [ebp + 8]
jne 0x10217a2
mov eax, dword [ebp - 4]
test cx, cx
mov ecx, dword [ebp + 8]
jne 0x10217ad
mov ecx, dword [ebp - 4]
shr eax, 0x10
cwde
push eax
movsx eax, cx
push eax
movzx eax, word [esi]
push eax
push 0x1021844
push 1
push 0x70
call edi
push 0x1009c78
push 1
push 0x70
call edi
add esp, 0x24
push dword [ebp + 0xc]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp - 4]
mov eax, 0x300
test word [esi + 2], ax
je 0x1021809
add esi, 8
cmp dword [ebp + 0x10], 1
jb 0x1021816
dec dword [ebp + 0x10]
jmp 0x102180c
add esi, 4
cmp dword [ebp + 0x10], 0
jne 0x10215ef
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 0x20]
push dword [0x1038268]
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc