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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x70]
mov edx, dword [ebx + 0x44]
mov dword [esp + 0x2c], edx
mov edi, dword [ebx + 0x40]
mov esi, dword [ebx + 0x48]
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x78]
test esi, esi
je 0x647bdaed
mov eax, dword [ebx]
cmp eax, 1
je 0x647bdb0c
jae 0x647bdae8
mov dword [esp + 4], 2
mov eax, dword [ebx + 0xa4]
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll_FT_Stream_Seek
test eax, eax
je 0x647bdcf0
xor ebp, ebp
mov dword [ebx], 3
jmp 0x647bdaef
cmp eax, 2
je 0x647bdb4c
xor ebp, ebp
mov dword [ebx + 0x40], edi
mov edx, dword [esp + 0x2c]
mov dword [ebx + 0x44], edx
mov esi, dword [esp + 0x28]
mov dword [ebx + 0x48], esi
mov eax, ebp
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebp, ebp
mov esi, dword [esp + 0x2c]
jmp 0x647bdb3b
mov ecx, eax
cmp eax, 0x100
jne 0x647bdbc0
mov edx, dword [ebx + 0x2c]
test edx, edx
je 0x647be0c4
mov dword [ebx + 0x38], 0
mov byte [ebx + 0x20], 1
xor esi, esi
xor edi, edi
mov eax, ebx
call fcn.647bd4c0
test eax, eax
jns 0x647bdb14
mov dword [esp + 0x2c], esi
jmp 0x647bdadd
mov edx, dword [ebx + 0x5c]
xor ebp, ebp
mov ecx, dword [esp + 0x74]
test ecx, ecx
je 0x647bde98
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
jmp 0x647bdb81
dec edx
mov dword [ebx + 0x5c], edx
mov esi, dword [ebx + 0x58]
mov dl, byte [esi + edx]
mov byte [eax + ebp], dl
inc ebp
cmp ebp, ecx
je 0x647bdaef
mov edx, dword [ebx + 0x5c]
test edx, edx
jne 0x647bdb68
mov eax, dword [ebx + 0x38]
cmp eax, dword [ebx + 0x30]
jae 0x647bdbac
mov esi, dword [ebx + 0x54]
cmp eax, esi
jae 0x647bdf08
mov edx, dword [ebx + 0x4c]
mov word [edx + eax*2], di
mov edx, dword [ebx + 0x50]
mov cl, byte [esp + 0x2c]
mov byte [edx + eax], cl
inc dword [ebx + 0x38]
mov dword [ebx], 1
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
jmp 0x647bdb3b
mov dword [esp + 0x2c], esi
mov dword [esp + 0x3c], eax
cmp eax, 0xff
ja 0x647bdbfe
mov edx, dword [ebx + 0x5c]
mov eax, dword [ebx + 0x60]
cmp eax, edx
jbe 0x647bddfc
mov eax, dword [ebx + 0x58]
mov byte [eax + edx], cl
inc edx
mov dword [ebx + 0x5c], edx
mov dword [ebx], 2
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jmp 0x647bdb51
sub eax, 0x100
cmp eax, dword [ebx + 0x38]
jae 0x647bddc4
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x647bdec0
mov edx, dword [ebx + 0x5c]
lea esi, [ebx + 0x64]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], edi
mov esi, ecx
jmp 0x647bdc65
mov eax, dword [ebx + 0x58]
mov ecx, dword [ebx + 0x50]
mov cl, byte [ecx + esi - 0x100]
sub esi, 0x100
mov byte [eax + edx], cl
inc edx
mov dword [ebx + 0x5c], edx
mov eax, dword [ebx + 0x4c]
movzx esi, word [eax + esi*2]
cmp esi, 0xff
jbe 0x647bdef9
test eax, eax
je 0x647bdeb8
mov eax, dword [ebx + 0x60]
cmp eax, edx
ja 0x647bdc30
mov ecx, dword [ebx + 0xa8]
mov edx, dword [ebx + 0x58]
cmp edx, dword [esp + 0x30]
je 0x647bded0
mov edi, eax
shr edi, 1
lea edi, [eax + edi + 4]
cmp edi, 0x10000
jbe 0x647bdef0
cmp eax, 0x10000
je 0x647bdeb8
mov dword [esp + 0x28], 0x10000
mov edi, 0x10000
lea ebp, [esp + 0x4c]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ecx
call sym.allegro_5.0.10_monolith_mt.dll_ft_mem_realloc
mov dword [ebx + 0x58], eax
mov ebp, dword [esp + 0x4c]
test ebp, ebp
jne 0x647bdeb8
mov dword [ebx + 0x60], edi
mov edx, dword [ebx + 0x5c]
jmp 0x647bdc33
mov dword [esp + 8], 1
lea eax, [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xa4]
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll_FT_Stream_TryRead
cmp eax, 1
jne 0x647bdadb
mov dl, byte [esp + 0x4c]
and edx, 0x1f
mov byte [esp + 0x30], dl
movzx edx, dl
mov dword [ebx + 0x28], edx
mov cl, byte [esp + 0x4c]
and ecx, 0xffffff80
mov esi, ecx
and esi, 0xff
mov dword [ebx + 0x2c], esi
mov ebp, eax
mov cl, byte [esp + 0x30]
shl ebp, cl
lea eax, [ebp - 0x100]
mov dword [ebx + 0x30], eax
cmp edx, 0x10
ja 0x647bdadb
mov dword [ebx + 0x34], 9
xor eax, eax
test esi, esi
setne al
mov dword [ebx + 0x38], eax
cmp edx, 9
ja 0x647be034
lea ecx, [ebp - 0xff]
mov dword [ebx + 0x3c], ecx
mov eax, ebx
call fcn.647bd4c0
cmp eax, 0xff
ja 0x647be027
mov ecx, dword [esp + 0x74]
test ecx, ecx
je 0x647bdd97
mov esi, dword [esp + 0x74]
mov byte [esi], al
cmp dword [esp + 0x78], 1
jbe 0x647be0ac
mov dword [ebx], 1
mov edi, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], 0
mov ebp, 1
mov esi, eax
jmp 0x647bdb3b
ja 0x647bdec0
mov eax, dword [ebx + 0x5c]
mov edx, dword [ebx + 0x60]
cmp eax, edx
jae 0x647bdf85
mov edx, dword [ebx + 0x58]
mov cl, byte [esp + 0x2c]
mov byte [edx + eax], cl
inc eax
mov dword [ebx + 0x5c], eax
mov ecx, edi
mov edx, eax
cmp edi, 0xff
ja 0x647bdc0c
jmp 0x647bdbd2
mov edx, dword [ebx + 0xa8]
mov dword [esp + 0x30], edx
mov esi, dword [ebx + 0x58]
mov dword [esp + 0x2c], esi
lea edx, [ebx + 0x64]
cmp esi, edx
je 0x647be03e
mov edx, eax
shr edx, 1
lea edx, [eax + edx + 4]
mov dword [esp + 0x28], edx
cmp edx, 0x10000
jbe 0x647bde44
cmp eax, 0x10000
je 0x647be070
mov edx, 0x10000
mov dword [esp + 0x28], 0x10000
lea esi, [esp + 0x4c]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 0x24], ecx
call sym.allegro_5.0.10_monolith_mt.dll_ft_mem_realloc
mov dword [ebx + 0x58], eax
mov esi, dword [esp + 0x4c]
test esi, esi
mov ecx, dword [esp + 0x24]
jne 0x647be070
mov edx, dword [esp + 0x28]
mov dword [ebx + 0x60], edx
mov edx, dword [ebx + 0x5c]
jmp 0x647bdbe0
mov eax, dword [esp + 0x78]
jmp 0x647bdead
dec edx
mov dword [ebx + 0x5c], edx
inc ebp
cmp ebp, eax
je 0x647bdaef
test edx, edx
jne 0x647bdea0
jmp 0x647bdb85
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
jmp 0x647bdadd
mov dword [ebx + 0x58], 0
mov edx, eax
shr edx, 1
lea edi, [eax + edx + 4]
xor edx, edx
xor eax, eax
cmp edi, 0x10000
ja 0x647bdc9e
nop
mov dword [esp + 0x28], edi
jmp 0x647bdcab
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov ecx, esi
jmp 0x647bdbd2
mov ecx, dword [ebx + 0xa8]
test esi, esi
je 0x647be015
mov eax, esi
shr eax, 2
add eax, esi
mov dword [esp + 0x30], eax
mov edx, eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], 3
mov dword [esp], ecx
call sym.allegro_5.0.10_monolith_mt.dll_ft_mem_realloc
mov dword [ebx + 0x4c], eax
mov edx, dword [esp + 0x4c]
test edx, edx
jne 0x647bdadd
mov ecx, dword [esp + 0x30]
lea edx, [eax + ecx*2]
mov dword [ebx + 0x50], edx
mov dword [esp + 8], esi
lea eax, [eax + esi*2]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.647d429c
mov esi, dword [esp + 0x30]
mov dword [ebx + 0x54], esi
mov eax, dword [ebx + 0x38]
jmp 0x647bdb98
mov eax, dword [ebx + 0xa8]
mov dword [esp + 0x30], eax
mov ecx, dword [ebx + 0x58]
lea eax, [ebx + 0x64]
cmp ecx, eax
je 0x647be081
mov eax, edx
shr eax, 1
lea eax, [edx + eax + 4]
mov dword [esp + 0x28], eax
cmp eax, 0x10000
jbe 0x647be0a3
cmp edx, 0x10000
je 0x647bdec0
mov eax, 0x10000
mov dword [esp + 0x28], 0x10000
lea esi, [esp + 0x4c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll_ft_mem_realloc
mov edx, eax
mov dword [ebx + 0x58], eax
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x647bdec0
mov ecx, dword [esp + 0x28]
mov dword [ebx + 0x60], ecx
mov eax, dword [ebx + 0x5c]
jmp 0x647bdddb
mov edx, 0x200
mov dword [esp + 0x30], 0x200
jmp 0x647bdf23
mov dword [esp + 0x28], 0
jmp 0x647bdadb
mov ecx, 0x100
jmp 0x647bdd74
mov dword [ebx + 0x58], 0
mov edx, eax
shr edx, 1
lea edx, [eax + edx + 4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 0
xor eax, eax
cmp edx, 0x10000
ja 0x647bde37
mov edx, dword [esp + 0x28]
jmp 0x647bde44
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jmp 0x647bdadd
mov dword [ebx + 0x58], 0
mov eax, edx
shr eax, 1
lea eax, [edx + eax + 4]
mov dword [esp + 0x28], eax
xor ecx, ecx
xor edx, edx
cmp eax, 0x10000
ja 0x647bdfc0
mov eax, dword [esp + 0x28]
jmp 0x647bdfcd
mov edi, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], 0
mov ebp, 1
jmp 0x647bdaef
mov dword [esp + 0x2c], esi
mov dword [esp + 0x3c], eax
cmp dword [ebx + 0x38], 0
je 0x647bddca
jmp 0x647bdc0c