Function at 0x490e71
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 0x490eec
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 0x490eec
mov ecx, esi
inc eax
lea edi, [ebp - 0x33c]
test esi, esi
rep stosd dword es:[edi], eax
jle 0x490eec
mov ecx, esi
or eax, 0xffffffff
lea edi, [ebp - 0x544]
rep stosd dword es:[edi], eax
xor edi, edi
cmp esi, edi
jne 0x490f12
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.00491297
add esp, 0x1c
mov dword [ebp + 0xc], eax
jmp 0x490f53
lea eax, [esi - 1]
test eax, eax
jle 0x49128f
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.00491297
add dword [ebp + 0xc], eax
add dword [ebp - 0xc], 0x20
add esp, 0x1c
inc edi
lea eax, [esi - 1]
cmp edi, eax
jl 0x490f26
cmp dword [ebp + 0xc], 0
je 0x49128f
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.004913f7
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 0x49117f
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 0x491169
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.0049176c
mov dword [ebp - 4], eax
lea eax, [ebp - 0x134]
push esi
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.0049176c
add esp, 0x18
cmp dword [ebp - 4], 0xffffffff
je 0x4911e8
cmp eax, 0xffffffff
je 0x4911e8
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.00491555
add esp, 0x1c
test eax, eax
je 0x491150
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.004913f7
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.004913f7
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
add esp, 0x20
test ecx, ecx
mov dword [ebp + ecx*4 - 0x134], eax
jne 0x4910df
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 0x49110e
mov dword [ebp - 0x130], eax
test ecx, ecx
jge 0x491116
test edx, edx
jl 0x491169
lea ecx, [edi - 1]
test ecx, ecx
jl 0x491130
lea eax, [ebp + ecx*4 - 0x33c]
cmp dword [eax], esi
jne 0x491130
mov edx, dword [ebp + 0xc]
dec ecx
mov dword [eax], edx
jns 0x49111d
lea ecx, [edi + 1]
jmp 0x491149
mov edx, dword [ebp - 0x18]
lea eax, [ebp + ecx*4 - 0x440]
cmp dword [eax], edx
jne 0x491169
mov edx, dword [ebp + 0xc]
inc ecx
mov dword [eax], edx
cmp ecx, dword [ebp - 0x10]
jl 0x491135
jmp 0x491169
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 0x490fb8
mov esi, dword [ebp - 0x10]
mov eax, esi
shl eax, 2
push eax
push dword [ebp + 8]
call fcn.0048845e
mov edi, eax
lea eax, [ebp - 0x134]
push 0
push eax
lea eax, [ebp - 0x238]
mov dword [ebp - 4], edi
push eax
call fcn.0049176c
mov dword [edi], eax
lea eax, [ebp - 0x134]
push 1
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.0049176c
add esp, 0x20
mov dword [edi + 4], eax
push 2
pop eax
cmp esi, eax
mov dword [ebp + 0xc], eax
jle 0x49128f
mov eax, dword [ebp - 8]
add eax, 0x34c
add ebx, 0x30c
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x10], ebx
jmp 0x4911f2
push 1
call fcn.004703ef
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 0x491247
sub ecx, eax
mov esi, ecx
jmp 0x49124a
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.0049176c
add esp, 0xc
test eax, eax
jl 0x491271
cmp esi, eax
je 0x491271
mov dword [edi + ebx*4], eax
jmp 0x49127a
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 0x4911ef
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret