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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
push eax
call sym.alleg40.dll__get_vtable
xor edi, edi
add esp, 4
cmp eax, edi
mov dword [ebp + 0x18], eax
jne 0x1001eb92
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov esi, dword [ebp + 0xc]
lea ecx, [esi*4 + 0x40]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
cmp ebx, edi
jne 0x1001ebb3
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov eax, dword [sym.alleg40.dll__gfx_bank]
lea edx, [esi*4]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
cmp eax, edi
mov dword [sym.alleg40.dll__gfx_bank], eax
jne 0x1001ebe4
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 8]
or edx, 0xffffffff
mov dword [ebx + 0x10], eax
mov dword [ebx], eax
mov eax, sym.alleg40.dll__stub_bank_switch
mov dword [ebx + 0x18], esi
mov dword [ebx + 4], esi
mov dword [ebx + 8], edx
mov dword [ebx + 0x14], edi
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x1c], sym.alleg40.dll__screen_vtable
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x28], edi
mov dword [ebx + 0x2c], DirectSoundCreate
mov dword [ebx + 0x30], edi
mov dword [ebx + 0x34], edi
mov dword [ebx + 0x38], edi
mov eax, 0
mov ax, ds
mov esi, dword [ebp + 0x18]
mov ecx, 0x2b
mov edi, sym.alleg40.dll__screen_vtable
mov dword [ebx + 0x3c], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x14]
mov dword [sym.alleg40.dll__last_bank_2], edx
mov dword [sym.alleg40.dll__last_bank_1], edx
mov edx, dword [ebp + 0x10]
mov dword [ecx + 0x80], edx
mov dword [ebx + 0x40], edx
mov eax, dword [sym.alleg40.dll__gfx_bank]
mov dword [eax], 0
mov eax, dword [ecx + 0x70]
test eax, eax
je 0x1001eca8
mov edx, dword [ebp + 0xc]
cmp edx, 1
jle 0x1001ed2b
mov ecx, 0xffffffc0
lea eax, [ebx + 0x44]
sub ecx, ebx
dec edx
mov esi, dword [eax - 4]
mov edi, dword [ebp + 0x1c]
add esi, edi
mov dword [eax], esi
mov edi, dword [sym.alleg40.dll__gfx_bank]
lea esi, [ecx + eax]
add eax, 4
dec edx
mov dword [esi + edi], 0
jne 0x1001ec81
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x18], 0
cmp edi, 1
jle 0x1001ed2b
mov esi, 0xffffffc0
lea eax, [ebx + 0x44]
sub esi, ebx
dec edi
mov dword [ebp + 0xc], edi
mov edi, dword [ebp + 0x1c]
mov dword [ebp + 8], esi
jmp 0x1001ecd3
mov edi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
mov esi, dword [eax - 4]
add esi, edi
mov dword [eax], esi
mov ecx, dword [ecx + 0x74]
lea edi, [esi + edi - 1]
add ecx, edx
cmp edi, ecx
jb 0x1001ed0e
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx + 0x78]
lea edi, [ecx + edx]
cmp esi, edi
jb 0x1001ed0e
mov esi, dword [eax]
sub esi, ecx
mov ecx, dword [ebp + 0x18]
inc ecx
mov dword [eax], esi
mov dword [ebp + 0x18], ecx
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx + 0x78]
lea edi, [ecx + edx]
cmp esi, edi
jae 0x1001ecf4
mov ecx, dword [ebp + 8]
mov esi, dword [sym.alleg40.dll__gfx_bank]
mov edi, dword [ebp + 0x18]
add ecx, eax
add eax, 4
mov dword [ecx + esi], edi
mov ecx, dword [ebp + 0xc]
dec ecx
mov dword [ebp + 0xc], ecx
jne 0x1001eccd
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
ret