Function at 0x1021594
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.01026d1b
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 0x1021619
mov eax, 0xc0000017
jmp 0x1021891
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 0x102186a
mov esi, dword [ebp + 0xc]
dec dword [ebp + 0x10]
mov eax, 0x300
test word [esi + 2], ax
mov eax, dword [ebp + 8]
jne 0x1021656
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.010270f9
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x1021844
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.01027545
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x1021709
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 0x1021898
push 1
push 0x70
call edi
push 0x100aba0
push 1
push 0x70
call edi
add esp, 0x24
jmp 0x102170f
mov edi, dword [sym.imp.ntdll.dll_DbgPrintEx]
mov ax, word [esi + 2]
mov ecx, 0x300
and ax, cx
je 0x1021731
mov cx, word [ebp + 8]
cmp word [ebp - 8], cx
jne 0x1021752
mov cx, word [ebp - 6]
cmp cx, word [ebp + 0xa]
jne 0x1021752
test ax, ax
jne 0x102183e
mov ax, word [ebp - 4]
cmp word [ebp - 0x10], ax
jne 0x1021752
mov ax, word [ebp - 0xe]
cmp ax, word [ebp - 2]
je 0x102183e
push 2
push dword [ebp + 8]
call fcn.01026d1b
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 0x102183e
mov ax, word [esi + 2]
mov ebx, 0x300
mov ecx, ebx
and ax, cx
mov ecx, dword [ebp + 8]
jne 0x102179e
mov ecx, dword [ebp - 4]
test ax, ax
mov eax, dword [ebp - 8]
jne 0x10217a9
mov eax, dword [ebp - 0x10]
push dword [ebp + 0xc]
push ecx
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.010272b8
mov eax, ebx
test word [esi + 2], ax
mov eax, dword [ebp + 8]
jne 0x10217cb
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
push 2
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.01027545
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x1021827
mov cx, word [esi + 2]
and cx, bx
mov eax, dword [ebp + 8]
jne 0x10217f6
mov eax, dword [ebp - 4]
test cx, cx
mov ecx, dword [ebp + 8]
jne 0x1021801
mov ecx, dword [ebp - 4]
shr eax, 0x10
cwde
push eax
movsx eax, cx
push eax
movzx eax, word [esi]
push eax
push 0x1021898
push 1
push 0x70
call edi
push 0x100aba0
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 0x102185d
add esi, 8
cmp dword [ebp + 0x10], 1
jb 0x102186a
dec dword [ebp + 0x10]
jmp 0x1021860
add esi, 4
cmp dword [ebp + 0x10], 0
jne 0x1021643
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