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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov byte [ecx + 0x10], 0
mov dword [ebp - 0x48], 0xff
mov word [ecx + 0xe], ax
mov eax, dword [ebp + 0xc]
mov byte [ecx + 0xc], al
lea eax, [ecx + 0x14]
mov dword [ebp - 0x3c], eax
mov ecx, dword [edi]
call fcn.0041b29a
movzx esi, al
cmp esi, 0xff
je 0x48944d
test byte [0x91bffe], 8
je 0x48913b
cmp esi, 8
jne 0x489131
mov byte [ebp - 0x28], 1
mov byte [ebp - 0x2c], 0xfe
jmp 0x4893e0
xor eax, eax
cmp esi, 9
setge al
sub esi, eax
cmp esi, 0x18
je 0x48919a
jg 0x489167
cmp esi, 9
jg 0x48915d
cmp esi, 8
jge 0x48937d
test esi, esi
je 0x48937d
jmp 0x4893d7
cmp esi, 0x15
je 0x4891c1
jmp 0x4893d7
cmp esi, 0x1d
jg 0x489183
cmp esi, 0x1c
jge 0x48937d
cmp esi, 0x19
je 0x48932f
jmp 0x4893d7
cmp esi, 0x20
je 0x48937d
cmp esi, 0x21
je 0x489221
jmp 0x4893d7
mov ecx, dword [edi]
call fcn.0041b36a
mov ecx, dword [edi]
movzx eax, ax
mov dword [ebx + 0x28], eax
call fcn.0041b36a
mov byte [ebp - 0x28], 1
mov byte [ebp - 0x2c], 0x18
movzx eax, ax
mov dword [ebx + 0x2c], eax
jmp 0x4893e0
mov ecx, dword [edi]
call fcn.0041b36a
mov ecx, dword [edi]
mov word [ebp - 0x40], ax
call fcn.0041b36a
mov word [ebp - 0x42], ax
mov eax, dword [ebx + 0x18]
sub eax, dword [ebx + 0x14]
cmp eax, 0x57
ja 0x4891f2
mov ecx, dword [ebp - 0x3c]
mov dword [esp], 0x16
call fcn.006f1aac
push eax
mov esi, dword [ebx + 0x14]
mov dword [esp], 8
call fcn.0071ed10
mov dl, byte [ebp - 0x40]
mov byte [eax + 4], dl
mov dl, byte [ebp - 0x42]
mov dword [eax], 0x81a960
mov byte [eax + 5], dl
mov ecx, dword [esi + 0x54]
mov dword [ebp - 0x28], ecx
mov dword [esi + 0x54], eax
jmp 0x4893cd
mov ecx, dword [edi]
mov dword [ebp - 0x28], 0x762064
call fcn.0041b36a
mov ecx, dword [edi]
movzx eax, ax
mov dword [ebp - 0x24], eax
call fcn.0041b36a
mov ecx, dword [edi]
mov word [ebp - 0x1a], ax
call fcn.0041b36a
mov word [ebp - 0x1c], ax
mov eax, dword [edi]
lea esi, [ebp - 0x2c]
mov ecx, esi
mov dword [esp], eax
call fcn.0041b5dc
push eax
lea ecx, [ebp - 0x28]
mov dword [esp], esi
call fcn.0069a360
mov ecx, esi
push eax
call fcn.0069bcc0
mov ecx, dword [edi]
call fcn.0041b36a
mov ecx, dword [edi]
mov word [ebp - 0x1e], ax
call fcn.0041b36a
mov word [ebp - 0x20], ax
mov eax, dword [ebx + 0x18]
sub eax, dword [ebx + 0x14]
cmp eax, 0x87
jbe 0x489305
mov eax, dword [ebx + 0x14]
mov dword [esp], 0x14
mov dword [ebp - 0x40], eax
call fcn.0071ed10
mov dword [eax], fcn.006690dc
mov esi, eax
lea ecx, [eax + 4]
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.0069b780
push eax
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x20]
mov word [esi + 0xc], ax
mov ax, word [ebp - 0x1e]
mov word [esi + 0xe], ax
mov eax, dword [ebp - 0x1c]
mov word [esi + 0x10], ax
mov ax, word [ebp - 0x1a]
mov word [esi + 0x12], ax
mov eax, dword [edx + 0x84]
mov dword [ebp - 0x2c], eax
mov dword [edx + 0x84], esi
call fcn.00669234
lea ecx, [ebp - 0x28]
call fcn.0069bcc0
jmp 0x4893f7
mov ecx, dword [ebp - 0x3c]
mov dword [esp], 0x22
call fcn.006f1aac
push eax
jmp 0x489291
mov ecx, dword [edi]
call fcn.0041b36a
movzx eax, ax
mov dword [ebx + 0x48], eax
mov eax, dword [ebx + 0x18]
sub eax, dword [ebx + 0x14]
cmp eax, 0x67
ja 0x489357
mov ecx, dword [ebp - 0x3c]
mov dword [esp], 0x1a
call fcn.006f1aac
push esi
mov esi, dword [ebx + 0x14]
mov dword [esp], 8
call fcn.0071ed10
mov edx, dword [ebx + 0x48]
mov dword [eax], 0x81a9f0
mov dword [eax + 4], edx
mov edx, dword [esi + 0x64]
mov dword [ebp - 0x28], edx
mov dword [esi + 0x64], eax
jmp 0x4893cd
mov ecx, dword [edi]
call fcn.0041b36a
mov word [ebp - 0x40], ax
mov eax, dword [ebx + 0x18]
sub eax, dword [ebx + 0x14]
sar eax, 2
cmp eax, esi
ja 0x4893a4
mov ecx, dword [ebp - 0x3c]
lea eax, [esi + 1]
mov dword [esp], eax
call fcn.006f1aac
push ecx
mov eax, dword [ebx + 0x14]
mov dword [esp], 8
lea esi, [eax + esi*4]
call fcn.0071ed10
mov edx, dword [ebp - 0x40]
mov dword [eax], 0x81aa08
mov word [eax + 4], dx
mov dword [ebp - 0x28], eax
mov edx, dword [esi]
mov dword [ebp - 0x28], edx
mov dword [esi], eax
lea ecx, [ebp - 0x28]
call fcn.00669234
jmp 0x4893f7
mov eax, esi
mov byte [ebp - 0x28], 1
mov byte [ebp - 0x2c], al
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.00667e1c
push edx
push edx
dec dword [ebp - 0x48]
jne 0x489100
lea ebx, [ebp - 0x28]
lea eax, [ebp - 0x2c]
mov ecx, ebx
mov dword [esp + 4], eax
mov dword [esp], str.corrupt_data
call fcn.0069b6e0
push esi
push esi
mov dword [esp], ebx
call fcn.00667f4c
mov ecx, esi
mov ebx, eax
call fcn.0069bcc0
jmp 0x48942f
lea ecx, [ebp - 0x28]
call fcn.0069bcc0
mov dword [esp], ebx
jmp 0x489448
call fcn.0061f380
mov ecx, dword [edi]
call fcn.0041b29a
mov ecx, dword [edi]
mov dl, al
mov dword [ebp - 0x3c], edx
call fcn.0041b29a
mov edx, dword [ebp - 0x3c]
movzx esi, dl
mov dword [ebx + 0x20], esi
movzx ecx, al
cmp al, 1
mov dword [ebx + 0x24], ecx
jbe 0x48968a
mov eax, esi
shl ecx, 5
shl eax, 5
cmp eax, ecx
mov dword [ebp - 0x30], ecx
mov ecx, dword [edi]
lea edx, [ebp - 0x34]
lea esi, [ebp - 0x30]
cmovge esi, edx
mov dword [ebp - 0x34], eax
call fcn.0041b29a
lea edx, [ebp - 0x2c]
movzx eax, al
cmp dword [esi], eax
mov dword [ebp - 0x2c], eax
cmovge esi, edx
mov eax, dword [esi]
mov ecx, dword [edi]
mov dword [ebx + 0x30], eax
call fcn.0041b29a
mov ecx, dword [edi]
movzx eax, al
mov dword [ebx + 0x44], eax
call fcn.0041b29a
mov ecx, dword [edi]
movzx eax, al
mov dword [ebx + 0x34], eax
call fcn.0041b29a
mov ecx, dword [edi]
movzx eax, al
mov dword [ebx + 0x38], eax
call fcn.0041b29a
mov ecx, dword [edi]
movzx eax, al
mov dword [ebx + 0x3c], eax
call fcn.0041b29a
mov esi, dword [ebx + 0x20]
imul esi, dword [ebx + 0x24]
imul esi, dword [ebx + 0x44]
imul esi, dword [ebx + 0x34]
imul esi, dword [ebx + 0x38]
imul esi, dword [ebx + 0x3c]
movzx eax, al
mov dword [ebx + 0x40], eax
imul esi, eax
test esi, esi
jne 0x48952b
lea eax, [ebp - 0x35]
lea ebx, [ebp - 0x28]
mov dword [esp + 4], eax
mov ecx, ebx
mov dword [esp], str.a_thing_type_has_no_sprites
call fcn.0069b6e0
push eax
push eax
mov dword [esp], ebx
call fcn.00667f4c
cmp esi, 0x1000
jle 0x489555
lea eax, [ebp - 0x35]
lea ebx, [ebp - 0x28]
mov dword [esp + 4], eax
mov ecx, ebx
mov dword [esp], str.a_thing_type_has_more_than_4096_sprites
call fcn.0069b6e0
push eax
push eax
mov dword [esp], ebx
call fcn.00667f4c
mov ecx, dword [ebx + 0x54]
mov eax, dword [ebx + 0x58]
sub eax, ecx
sar eax, 2
cmp esi, eax
jbe 0x48957d
mov edx, esi
sub edx, eax
lea ecx, [ebx + 0x54]
mov dword [esp], edx
call fcn.006f3038
push eax
mov dword [ebp - 0x3c], 0
jmp 0x4895ab
jae 0x489574
lea eax, [ecx + esi*4]
mov dword [ebx + 0x58], eax
jmp 0x489574
mov eax, dword [ebx + 0x54]
mov edx, dword [ebp - 0x3c]
test byte [0x91bffe], 4
mov ecx, dword [edi]
lea eax, [eax + edx*4]
mov dword [ebp - 0x40], eax
je 0x4895b2
call fcn.0041b434
mov edx, dword [ebp - 0x40]
inc dword [ebp - 0x3c]
mov dword [edx], eax
cmp dword [ebp - 0x3c], esi
jl 0x489587
jmp 0x4895bc
call fcn.0041b36a
movzx eax, ax
jmp 0x4895a3
mov edi, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x60]
mov edx, dword [ebx + 0x40]
mov eax, edi
sub eax, ecx
sar eax, 2
cmp edx, eax
jbe 0x4895e0
sub edx, eax
lea ecx, [ebx + 0x60]
mov dword [esp], edx
call fcn.006f09c8
push eax
jmp 0x489600
jae 0x489600
lea eax, [ecx + edx*4]
mov esi, eax
cmp esi, edi
je 0x4895fd
mov ecx, esi
add esi, 4
mov dword [ebp - 0x3c], eax
call fcn.00668b24
mov eax, dword [ebp - 0x3c]
jmp 0x4895e7
mov dword [ebx + 0x64], eax
mov eax, dword [ebx + 0x40]
lea ecx, [ebx + 0x6c]
mov dword [esp], eax
call fcn.006f1d44
lea ecx, [ebx + 0x78]
push eax
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call fcn.006f1d44
push eax
mov ecx, dword [ebx + 0x88]
mov esi, dword [ebx + 0x84]
mov eax, dword [ebx + 0x40]
mov edx, ecx
sub edx, esi
sar edx, 2
imul edx, edx, 0xaaaaaaab
cmp eax, edx
jbe 0x489651
sub eax, edx
lea ecx, [ebx + 0x84]
mov dword [esp], eax
call fcn.006f1dec
push edi
jmp 0x48969d
jae 0x48969d
imul eax, eax, 0xc
lea edi, [esi + eax]
mov esi, edi
cmp esi, ecx
je 0x489678
mov eax, dword [esi]
test eax, eax
je 0x489673
mov dword [esp], eax
mov dword [ebp - 0x3c], ecx
call fcn.0071eb20
mov ecx, dword [ebp - 0x3c]
add esi, 0xc
jmp 0x48965b
mov dword [ebx + 0x88], edi
jmp 0x48969d
cmp dl, 1
mov eax, 0x20
jbe 0x4894a7
jmp 0x489477
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc