Function at 0x102157c
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.01026d03
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 0x1021601
mov eax, 0xc0000017
jmp 0x1021879
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 0x1021852
mov esi, dword [ebp + 0xc]
dec dword [ebp + 0x10]
mov eax, 0x300
test word [esi + 2], ax
mov eax, dword [ebp + 8]
jne 0x102163e
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.010270e1
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x102182c
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.0102752d
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x10216f1
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 0x1021880
push 1
push 0x70
call edi
push 0x100ac30
push 1
push 0x70
call edi
add esp, 0x24
jmp 0x10216f7
mov edi, dword [sym.imp.ntdll.dll_DbgPrintEx]
mov ax, word [esi + 2]
mov ecx, 0x300
and ax, cx
je 0x1021719
mov cx, word [ebp + 8]
cmp word [ebp - 8], cx
jne 0x102173a
mov cx, word [ebp - 6]
cmp cx, word [ebp + 0xa]
jne 0x102173a
test ax, ax
jne 0x1021826
mov ax, word [ebp - 4]
cmp word [ebp - 0x10], ax
jne 0x102173a
mov ax, word [ebp - 0xe]
cmp ax, word [ebp - 2]
je 0x1021826
push 2
push dword [ebp + 8]
call fcn.01026d03
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 0x1021826
mov ax, word [esi + 2]
mov ebx, 0x300
mov ecx, ebx
and ax, cx
mov ecx, dword [ebp + 8]
jne 0x1021786
mov ecx, dword [ebp - 4]
test ax, ax
mov eax, dword [ebp - 8]
jne 0x1021791
mov eax, dword [ebp - 0x10]
push dword [ebp + 0xc]
push ecx
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.010272a0
mov eax, ebx
test word [esi + 2], ax
mov eax, dword [ebp + 8]
jne 0x10217b3
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
push 2
push eax
movzx eax, word [esi]
push eax
push dword [0x10383d4]
call fcn.0102752d
mov dword [ebp - 0xc], eax
test eax, eax
jge 0x102180f
mov cx, word [esi + 2]
and cx, bx
mov eax, dword [ebp + 8]
jne 0x10217de
mov eax, dword [ebp - 4]
test cx, cx
mov ecx, dword [ebp + 8]
jne 0x10217e9
mov ecx, dword [ebp - 4]
shr eax, 0x10
cwde
push eax
movsx eax, cx
push eax
movzx eax, word [esi]
push eax
push 0x1021880
push 1
push 0x70
call edi
push 0x100ac30
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 0x1021845
add esi, 8
cmp dword [ebp + 0x10], 1
jb 0x1021852
dec dword [ebp + 0x10]
jmp 0x1021848
add esi, 4
cmp dword [ebp + 0x10], 0
jne 0x102162b
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