Function at 0x490c01
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd44
and dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
push esi
push edi
mov esi, dword [ebx + 0x504]
mov eax, dword [ebx + 0x510]
mov edx, dword [ebx + 0x508]
mov dword [ebp - 8], eax
test esi, esi
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], esi
jle 0x490c7c
mov ecx, esi
mov eax, 0xffffff38
lea edi, [ebp - 0x238]
rep stosd dword es:[edi], eax
mov ecx, esi
lea edi, [ebp - 0x134]
rep stosd dword es:[edi], eax
mov ecx, esi
xor eax, eax
lea edi, [ebp - 0x440]
test esi, esi
rep stosd dword es:[edi], eax
jle 0x490c7c
mov ecx, esi
inc eax
lea edi, [ebp - 0x33c]
test esi, esi
rep stosd dword es:[edi], eax
jle 0x490c7c
mov ecx, esi
or eax, 0xffffffff
lea edi, [ebp - 0x544]
rep stosd dword es:[edi], eax
xor edi, edi
cmp esi, edi
jne 0x490ca2
push dword [ebp - 8]
lea eax, [ebp - 0xd44]
push edx
push eax
push edx
push edi
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call fcn.00491027
add esp, 0x1c
mov dword [ebp + 0xc], eax
jmp 0x490ce3
lea eax, [esi - 1]
test eax, eax
jle 0x49101f
lea eax, [ebp - 0xd44]
mov dword [ebp - 0xc], eax
push dword [ebp - 8]
push dword [ebp - 0x18]
push dword [ebp - 0xc]
push dword [ebx + edi*4 + 4]
push dword [ebx + edi*4]
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call fcn.00491027
add dword [ebp + 0xc], eax
add dword [ebp - 0xc], 0x20
add esp, 0x1c
inc edi
lea eax, [esi - 1]
cmp edi, eax
jl 0x490cb6
cmp dword [ebp + 0xc], 0
je 0x49101f
mov eax, 0xffffff38
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi - 1]
push eax
lea eax, [ebp - 0xd44]
push eax
call fcn.00491187
mov eax, dword [ebp - 0x28]
add esp, 0x10
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x2c]
push 2
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x234], eax
pop eax
cmp esi, eax
mov dword [ebp + 0xc], eax
jle 0x490f0f
lea eax, [ebx + 0x210]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov ecx, eax
mov dword [ebp - 0x24], eax
shl ecx, 2
mov eax, dword [ebp + ecx - 0x440]
mov esi, dword [ebp + ecx - 0x33c]
mov dword [ebp - 0x18], eax
lea ecx, [ebp + eax*4 - 0x544]
cmp dword [ecx], esi
je 0x490ef9
mov edx, dword [ebx + esi*4 + 0x208]
mov edi, dword [ebx + eax*4 + 0x208]
mov dword [ecx], esi
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x30], edx
push eax
mov edx, dword [ecx + eax*4 + 0x344]
mov ecx, dword [ecx + esi*4 + 0x344]
lea eax, [ebp - 0x134]
mov dword [ebp - 0x14], edx
push eax
lea eax, [ebp - 0x238]
push eax
mov dword [ebp - 0x1c], ecx
call fcn.004914fc
mov dword [ebp - 4], eax
lea eax, [ebp - 0x134]
push esi
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.004914fc
add esp, 0x18
cmp dword [ebp - 4], 0xffffffff
je 0x490f78
cmp eax, 0xffffffff
je 0x490f78
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push eax
push dword [ebp - 4]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call fcn.004912e5
add esp, 0x1c
test eax, eax
je 0x490ee0
mov eax, 0xffffff38
mov dword [ebp - 4], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x24]
sub eax, edi
shl edi, 5
push eax
lea eax, [ebp + edi - 0xd44]
push eax
call fcn.00491187
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x30]
sub eax, edi
push eax
mov eax, edi
shl eax, 5
lea eax, [ebp + eax - 0xd44]
push eax
call fcn.00491187
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
add esp, 0x20
test ecx, ecx
mov dword [ebp + ecx*4 - 0x134], eax
jne 0x490e6f
mov dword [ebp - 0x238], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
shl eax, 2
cmp esi, 1
mov dword [ebp + eax - 0x238], ecx
mov dword [ebp + eax - 0x134], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp + esi*4 - 0x238], eax
jne 0x490e9e
mov dword [ebp - 0x130], eax
test ecx, ecx
jge 0x490ea6
test edx, edx
jl 0x490ef9
lea ecx, [edi - 1]
test ecx, ecx
jl 0x490ec0
lea eax, [ebp + ecx*4 - 0x33c]
cmp dword [eax], esi
jne 0x490ec0
mov edx, dword [ebp + 0xc]
dec ecx
mov dword [eax], edx
jns 0x490ead
lea ecx, [edi + 1]
jmp 0x490ed9
mov edx, dword [ebp - 0x18]
lea eax, [ebp + ecx*4 - 0x440]
cmp dword [eax], edx
jne 0x490ef9
mov edx, dword [ebp + 0xc]
inc ecx
mov dword [eax], edx
cmp ecx, dword [ebp - 0x10]
jl 0x490ec5
jmp 0x490ef9
mov eax, dword [ebp + 0xc]
mov ecx, 0xffffff38
shl eax, 2
mov dword [ebp + eax - 0x238], ecx
mov dword [ebp + eax - 0x134], ecx
inc dword [ebp + 0xc]
add dword [ebp - 0xc], 4
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x10]
jl 0x490d48
mov esi, dword [ebp - 0x10]
mov eax, esi
shl eax, 2
push eax
push dword [ebp + 8]
call fcn.004881ee
mov edi, eax
lea eax, [ebp - 0x134]
push 0
push eax
lea eax, [ebp - 0x238]
mov dword [ebp - 4], edi
push eax
call fcn.004914fc
mov dword [edi], eax
lea eax, [ebp - 0x134]
push 1
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.004914fc
add esp, 0x20
mov dword [edi + 4], eax
push 2
pop eax
cmp esi, eax
mov dword [ebp + 0xc], eax
jle 0x49101f
mov eax, dword [ebp - 8]
add eax, 0x34c
add ebx, 0x30c
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x10], ebx
jmp 0x490f82
push 1
call fcn.0047017f
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 0xfc]
mov ecx, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov ebx, dword [ebx]
mov ecx, dword [ecx + eax*4 + 0x344]
mov esi, dword [edi + ebx*4]
mov dword [ebp + 8], ecx
mov ecx, dword [edi + eax*4]
mov eax, 0x7fff
and ecx, eax
and esi, eax
sub esi, ecx
mov eax, esi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp + 0x14]
mov edx, dword [edx]
sub edx, dword [ebp + 8]
imul eax, edx
mov edx, dword [ebp - 8]
mov ebx, dword [edx + ebx*4 + 0x344]
sub ebx, dword [ebp + 8]
cdq
idiv ebx
test esi, esi
jge 0x490fd7
sub ecx, eax
mov esi, ecx
jmp 0x490fda
lea esi, [eax + ecx]
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x134]
push ebx
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.004914fc
add esp, 0xc
test eax, eax
jl 0x491001
cmp esi, eax
je 0x491001
mov dword [edi + ebx*4], eax
jmp 0x49100a
or esi, 0x8000
mov dword [edi + ebx*4], esi
add dword [ebp + 0x10], 4
add dword [ebp + 0x14], 4
inc ebx
cmp ebx, dword [ebp - 0x10]
mov dword [ebp + 0xc], ebx
jl 0x490f7f
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret