Function at 0x102c5bf0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
push edi
mov edi, edx
xor ebp, ebp
mov esi, ecx
mov ebx, dword [edi + 0xc]
cmp ebx, 0x11
jb 0x102c5ef7
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x24]
call fcn.102bb130
cmp ebx, 0x12
jb 0x102c5ef7
mov al, byte [edx + 0x11]
movzx ecx, al
mov byte [esp + 0x3c], al
mov ebx, ecx
push ecx
push dword [esp + 0x34]
mov eax, ecx
shr ebx, 1
push dword [esp + 0x34]
and eax, 1
and ebx, 3
push dword [esp + 0x34]
mov dword [esp + 0x20], eax
push dword [esp + 0x34]
mov dword [esp + 0x68], eax
mov eax, ecx
shr eax, 3
and eax, 1
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x70], eax
mov eax, ecx
shr eax, 4
and eax, 7
push str.halftone_region:__d_x__d_____x__d__flags_02x
push dword [edi]
mov dword [esp + 0x7c], eax
mov eax, ecx
shr eax, 7
push 1
push esi
mov dword [esp + 0x88], eax
call fcn.10283d90
mov ecx, dword [esp + 0x34]
add esp, 0x24
test ecx, ecx
je 0x102c5ccc
test ebx, ebx
je 0x102c5cb0
push ecx
push ebx
push str.HTEMPLATE_is__d_when_HMMR_is__d__contrary_to_spec
push dword [edi]
push 2
push esi
call fcn.10283d90
mov ecx, dword [esp + 0x28]
add esp, 0x18
mov eax, dword [esp + 0x14]
test eax, eax
je 0x102c5ccc
push ecx
push eax
push str.HENABLESKIP_is__d_when_HMMR_is__d__contrary_to_spec
push dword [edi]
push 2
push esi
call fcn.10283d90
add esp, 0x18
mov eax, dword [edi + 0xc]
add eax, 0xffffffee
cmp eax, 0x10
jb 0x102c5ef7
mov ecx, dword [esp + 0x6c]
movzx edx, byte [ecx + 0x12]
movzx eax, byte [ecx + 0x13]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x14]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x15]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x17]
mov dword [esp + 0x20], edx
mov dword [esp + 0x40], edx
movzx edx, byte [ecx + 0x16]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x18]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x19]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x1b]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x44], edx
movzx edx, byte [ecx + 0x1a]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x1c]
xor edx, 0xffff8000
shl eax, 8
sub edx, 0x8000
shl edx, 0x10
or edx, eax
movzx eax, byte [ecx + 0x1d]
or edx, eax
movzx eax, byte [ecx + 0x1f]
mov dword [esp + 0x18], edx
mov dword [esp + 0x48], edx
movzx edx, byte [ecx + 0x1e]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0x20]
xor edx, 0xffff8000
shl eax, 8
sub edx, 0x8000
shl edx, 0x10
or edx, eax
movzx eax, byte [ecx + 0x21]
or edx, eax
mov eax, dword [edi + 0xc]
add eax, 0xffffffde
mov dword [esp + 0x14], edx
mov dword [esp + 0x4c], edx
cmp eax, 4
jb 0x102c5ef7
movzx edx, byte [ecx + 0x22]
movzx eax, byte [ecx + 0x23]
movzx ecx, byte [ecx + 0x25]
shl dx, 8
or dx, ax
mov eax, dword [esp + 0x6c]
mov word [esp + 0x50], dx
movzx edx, dx
movzx eax, byte [eax + 0x24]
shl ax, 8
or cx, ax
mov word [esp + 0x52], cx
movzx ecx, cx
movzx eax, cl
push eax
shr ecx, 8
push ecx
movzx eax, dl
push eax
movzx eax, byte [esp + 0x58]
shr edx, 8
push edx
push eax
mov eax, dword [esp + 0x28]
sar eax, 8
push eax
movzx eax, byte [esp + 0x60]
push eax
mov eax, dword [esp + 0x34]
sar eax, 8
push eax
push dword [esp + 0x3c]
push dword [esp + 0x44]
push str._grid__d_x__d_____d._d__d._d__vector___d._d__d._d_
push dword [edi]
push 1
push esi
call fcn.10283d90
add esp, 0x38
cmp dword [esp + 0x10], ebp
jne 0x102c5e4e
mov edx, ebx
call fcn.102ca6b0
mov ebx, eax
mov eax, dword [esi]
cmp ebx, 0xffffff00
jae 0x102c5e89
push ebx
push eax
mov eax, dword [eax]
call eax
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x102c5e89
push ebx
push 0
push ebp
call sub.MSVCR120.dll_memset
add esp, 0xc
push dword [esp + 0x28]
mov edx, dword [esp + 0x28]
mov ecx, esi
call fcn.102ba020
add esp, 4
mov ebx, eax
push ebp
test ebx, ebx
jne 0x102c5e90
mov eax, dword [esi]
push eax
mov eax, dword [eax + 4]
call eax
push str.unable_to_allocate_halftone_image
push dword [edi]
push 2
push esi
call fcn.10283d90
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
push str.failed_to_allocate_GB_stats_in_halftone_region
jmp 0x102c5efc
mov eax, dword [edi + 0xc]
mov edx, edi
sub eax, 0x26
mov ecx, esi
push ebx
push eax
mov eax, dword [esp + 0x78]
add eax, 0x26
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.102c5a20
add esp, 0x14
mov edi, eax
cmp dword [esp + 0x54], 0
jne 0x102c5ec6
mov ecx, dword [esi]
push ebp
push ecx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
push dword [esp + 0x34]
imul edx, dword [esi + 0x40], 0x2c
mov ecx, esi
push dword [esp + 0x34]
push dword [esp + 0x34]
add edx, dword [esi + 0x48]
push ebx
call fcn.10283b60
add esp, 0x10
mov edx, ebx
mov ecx, esi
call fcn.102ba0f0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
push str.Segment_too_short
push dword [edi]
push 3
push esi
call fcn.10283d90
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret