Function at 0x403f80
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x984
push esi
push edi
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
mov edx, dword [0x5212d8]
push edx
call fcn.0049db90
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jne 0x403fc9
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push str.no_such_scrolling_texture__s
call fcn.0041ac80
add esp, 8
push 0
call fcn.004385b9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x14]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x20], 0x40
jle 0x404017
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
push str.scrolling_texture__s___64_high
call fcn.0041ac80
add esp, 8
push 0
call fcn.004385b9
mov eax, dword [ebp - 0xc]
imul eax, dword [ebp - 0x20]
imul eax, dword [ebp - 0x20]
cmp eax, 0x8000
jle 0x404043
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
push str.scrolling_texture__s_too_big
call fcn.0041ac80
add esp, 8
push 0
call fcn.004385b9
mov dword [ebp - 0x18], 0
jmp 0x404055
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x20]
jge 0x40407f
push 4
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00458a60
add esp, 0x10
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov dword [ecx + edx*4 + 8], eax
jmp 0x40404c
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00456ea0
add esp, 0xc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40418a
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00456f90
add esp, 4
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00458710
add esp, 8
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x14], 0x258
jle 0x4040e5
jmp 0x40418a
mov dword [ebp - 0x18], 0
jmp 0x4040f7
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jge 0x40417e
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
lea edi, [ebp - 0x984]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x20]
sub eax, 1
mov ecx, dword [ebp - 0x14]
imul ecx, eax
mov esi, dword [ebp - 0x10]
add esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x14]
lea esi, [ebp - 0x984]
mov eax, dword [ebp - 0x20]
sub eax, 1
imul eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
add edi, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx*4 + 8]
push eax
call fcn.00458760
add esp, 8
jmp 0x4040ee
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00456f20
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret