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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [sym.alleg40.dll_color_map]
mov ecx, dword [sym.alleg40.dll__blender_alpha]
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [0x1008953c], eax
mov dword [0x10089548], ecx
call sym.alleg40.dll_solid_mode
mov eax, dword [0x1008954c]
mov edx, dword [eax + 0x1c]
mov ecx, dword [edx + 0x10]
cmp ecx, ebx
je 0x1003aa26
push eax
call ecx
mov eax, dword [0x1008954c]
add esp, 4
mov edx, dword [0x10089564]
xor ecx, ecx
cmp edx, ebx
jle 0x1003aa53
xor eax, eax
mov edx, dword [0x10089558]
inc ecx
mov dword [eax + edx + 8], ebx
mov edx, dword [0x10089564]
add eax, 0xbc
cmp ecx, edx
jl 0x1003aa34
mov eax, dword [0x1008954c]
mov ecx, dword [eax + 0x14]
mov dword [0x10089540], ecx
mov edx, dword [eax + 0x18]
cmp ecx, edx
jge 0x1003acb3
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x20]
mov eax, dword [ebp - 0xc]
call ecx
mov dword [0x10089550], eax
mov eax, dword [0x10089544]
test eax, eax
mov esi, eax
je 0x1003aabe
jmp 0x1003aa8f
mov eax, dword [0x10089544]
mov ecx, dword [esi]
mov edx, dword [0x10089540]
cmp ecx, edx
jne 0x1003aabe
mov edi, dword [esi + 0x7c]
push esi
push eax
call sym.alleg40.dll__remove_edge
push 0xffffffffffffffff
push esi
push ebx
mov dword [0x10089544], eax
call fcn.1003a410
add esp, 0x14
mov ebx, eax
test edi, edi
mov esi, edi
jne 0x1003aa8a
test ebx, ebx
je 0x1003ac96
mov dword [0x10089534], 0x80000000
mov dword [0x10089538], 0
mov edx, dword [ebx + 8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
add eax, 0xffff
jns 0x1003aaec
jo 0x1003aaf1
sar eax, 0x10
jmp 0x1003aafb
call fcn.100073d0
mov eax, 0x7fff
mov esi, dword [ebx + 0x80]
mov edi, eax
mov eax, 1
sub eax, dword [esi + 8]
mov dword [esi + 8], eax
je 0x1003ab79
mov edi, dword [ebp - 4]
xor eax, eax
mov ecx, edi
mov dword [ebp - 0xc], eax
cmp ecx, eax
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], eax
je 0x1003ab41
mov eax, dword [0x10089540]
push edi
push ebx
push eax
call fcn.1003ad20
add esp, 0xc
test eax, eax
je 0x1003ab41
mov dword [ebp - 0xc], edi
mov edi, dword [edi]
test edi, edi
jne 0x1003ab24
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
push ecx
push edi
push ebx
push edx
call fcn.1003ada0
add esp, 0x10
test eax, eax
je 0x1003ab5a
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0xc]
mov dword [esi], edi
test edi, edi
mov dword [esi + 4], eax
je 0x1003ab69
mov dword [edi + 4], esi
test eax, eax
je 0x1003ab71
mov dword [eax], esi
jmp 0x1003abcb
mov dword [ebp - 8], ebx
mov dword [ebp - 4], esi
jmp 0x1003abcb
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
push eax
push esi
push ebx
push ecx
mov dword [esi + 0x54], ebx
call fcn.1003ada0
add esp, 0x10
test eax, eax
je 0x1003abad
mov eax, dword [0x10089534]
mov dword [ebp - 8], ebx
cmp edi, eax
jle 0x1003abad
mov dword [0x10089534], edi
mov edx, dword [ebx + 0x44]
mov dword [0x10089538], edx
mov eax, dword [esi]
test eax, eax
je 0x1003abb9
mov ecx, dword [esi + 4]
mov dword [eax + 4], ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x1003abc6
mov edx, dword [esi]
mov dword [eax], edx
jmp 0x1003abcb
mov eax, dword [esi]
mov dword [ebp - 4], eax
mov eax, ebx
mov ebx, dword [ebx + 0x7c]
test ebx, ebx
jne 0x1003aada
test eax, eax
je 0x1003ac96
mov ecx, dword [0x10089540]
mov edx, dword [eax + 4]
mov esi, dword [eax + 0x78]
cmp ecx, edx
jge 0x1003ac8c
mov edx, dword [eax + 0x80]
mov edi, dword [eax + 8]
mov ecx, dword [edx + 0xc]
mov edx, dword [eax + 0xc]
add edi, edx
mov dword [eax + 8], edi
fld dword [eax + 0x48]
fadd dword [eax + 0x44]
test cl, 1
fstp dword [eax + 0x44]
jne 0x1003ac7e
test cl, 2
je 0x1003ac26
mov edx, dword [eax + 0x28]
mov edi, dword [eax + 0x24]
add edi, edx
mov dword [eax + 0x24], edi
test cl, 4
je 0x1003ac4c
mov edx, dword [eax + 0x38]
mov edi, dword [eax + 0x2c]
add edi, edx
mov edx, dword [eax + 0x3c]
mov dword [eax + 0x2c], edi
mov edi, dword [eax + 0x30]
add edi, edx
mov edx, dword [eax + 0x40]
mov dword [eax + 0x30], edi
mov edi, dword [eax + 0x34]
add edi, edx
mov dword [eax + 0x34], edi
test cl, 8
je 0x1003ac67
mov edx, dword [eax + 0x1c]
mov edi, dword [eax + 0x14]
add edi, edx
mov edx, dword [eax + 0x20]
mov dword [eax + 0x14], edi
mov edi, dword [eax + 0x18]
add edi, edx
mov dword [eax + 0x18], edi
test cl, 0x20
je 0x1003ac7e
fld dword [eax + 0x54]
fadd dword [eax + 0x4c]
fstp dword [eax + 0x4c]
fld dword [eax + 0x58]
fadd dword [eax + 0x50]
fstp dword [eax + 0x50]
push 0xffffffffffffffff
push eax
push ebx
call fcn.1003a410
add esp, 0xc
mov ebx, eax
test esi, esi
mov eax, esi
jne 0x1003abe0
mov ecx, dword [0x10089540]
mov eax, dword [0x1008954c]
inc ecx
mov dword [0x10089540], ecx
mov edx, dword [eax + 0x18]
cmp ecx, edx
jl 0x1003aa67
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x1c]
mov ecx, dword [ecx + 8]
call ecx
mov ecx, dword [0x1008954c]
mov eax, dword [ecx + 0x1c]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x1003acd7
push ecx
call eax
add esp, 4
mov ecx, dword [0x1008953c]
mov edx, dword [0x10089548]
mov dword [sym.alleg40.dll_color_map], ecx
mov dword [sym.alleg40.dll__blender_alpha], edx
call sym.alleg40.dll_solid_mode
mov eax, dword [0x10089560]
mov ecx, dword [0x10089568]
pop edi
pop esi
mov dword [0x1008955c], eax
mov dword [0x10089564], ecx
pop ebx
mov esp, ebp
pop ebp
ret