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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10164730
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x101c3584]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov esi, dword [0x101f6124]
cmp dword [esi + 0x60], 0
je 0x1002cef4
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x14], eax
cmp dword [edi + 0xc], eax
jbe 0x1002cc80
call fcn.1013da0c
mov ebx, dword [edi + 0xc]
mov eax, dword [edi]
mov dword [esp + 0x18], eax
cmp ebx, dword [edi + 0x10]
jbe 0x1002cc93
call fcn.1013da0c
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [edi]
push ecx
push edx
push ebx
push eax
lea eax, [esp + 0x28]
push eax
mov ecx, edi
call fcn.10032e50
mov ebx, dword [esi + 0x84]
or ebx, dword [esi + 0x80]
or ebx, dword [esi + 0x7c]
or ebx, dword [esi + 0x78]
or ebx, dword [esi + 0x74]
or ebx, dword [esi + 0x70]
or ebx, dword [esi + 0x6c]
je 0x1002cef4
lea ecx, [esp + 0x20]
call fcn.100322e0
xor esi, esi
mov dword [esp + 0x60], esi
push str.TWPT_BW
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call fcn.1000ba40
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 1
call fcn.100323c0
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
cmp eax, edx
je 0x1002cd24
cmp eax, esi
je 0x1002cd24
push eax
call fcn.1005a120
add esp, 4
push str.TWPT_BW
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call fcn.1000ba40
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 2
call fcn.100323c0
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
cmp eax, ecx
je 0x1002cd6b
cmp eax, esi
je 0x1002cd6b
push eax
call fcn.1005a120
add esp, 4
push str.TWPT_GRAY
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call fcn.1000ba40
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 3
call fcn.100323c0
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
cmp eax, ecx
je 0x1002cdb2
cmp eax, esi
je 0x1002cdb2
push eax
call fcn.1005a120
add esp, 4
push str.TWPT_RGB
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call fcn.1000ba40
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 4
call fcn.100323c0
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
cmp eax, ecx
je 0x1002cdf9
cmp eax, esi
je 0x1002cdf9
push eax
call fcn.1005a120
add esp, 4
mov esi, dword [esp + 0x30]
sub esi, dword [esp + 0x2c]
mov ecx, edi
sar esi, 3
mov dword [esp + 0x18], esi
call fcn.10032290
xor edi, edi
mov dword [esp + 0x14], 1
test esi, esi
jbe 0x1002cee3
test bl, 1
je 0x1002ced8
cmp dword [esp + 0x14], 0
jne 0x1002ce3c
cmp edi, 1
jbe 0x1002ced8
jmp 0x1002ce44
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x30]
sub edx, dword [esp + 0x2c]
sar edx, 3
cmp edi, edx
jb 0x1002ce58
call fcn.1013da0c
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + edi*8]
mov eax, esi
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002ce80
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x40]
call fcn.100019f0
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [ebp + 8]
mov byte [esp + 0x64], 5
call fcn.100321e0
mov byte [esp + 0x60], 0
cmp dword [esp + 0x50], 0x10
jb 0x1002cebf
mov edx, dword [esp + 0x3c]
push edx
call fcn.1013d576
add esp, 4
mov esi, dword [esp + 0x18]
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
inc edi
shr ebx, 1
cmp edi, esi
jb 0x1002ce21
lea ecx, [esp + 0x20]
mov dword [esp + 0x60], 0xffffffff
call fcn.10032340
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4