Function at 0x481387
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 0x481402
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 0x481402
mov ecx, esi
inc eax
lea edi, [ebp - 0x33c]
test esi, esi
rep stosd dword es:[edi], eax
jle 0x481402
mov ecx, esi
or eax, 0xffffffff
lea edi, [ebp - 0x544]
rep stosd dword es:[edi], eax
xor edi, edi
cmp esi, edi
jne 0x481428
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.004817ad
add esp, 0x1c
mov dword [ebp + 0xc], eax
jmp 0x481469
lea eax, [esi - 1]
test eax, eax
jle 0x4817a5
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.004817ad
add dword [ebp + 0xc], eax
add dword [ebp - 0xc], 0x20
add esp, 0x1c
inc edi
lea eax, [esi - 1]
cmp edi, eax
jl 0x48143c
cmp dword [ebp + 0xc], 0
je 0x4817a5
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.0048190d
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 0x481695
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 0x48167f
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.00481c82
mov dword [ebp - 4], eax
lea eax, [ebp - 0x134]
push esi
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.00481c82
add esp, 0x18
cmp dword [ebp - 4], 0xffffffff
je 0x4816fe
cmp eax, 0xffffffff
je 0x4816fe
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.00481a6b
add esp, 0x1c
test eax, eax
je 0x481666
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.0048190d
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.0048190d
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
add esp, 0x20
test ecx, ecx
mov dword [ebp + ecx*4 - 0x134], eax
jne 0x4815f5
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 0x481624
mov dword [ebp - 0x130], eax
test ecx, ecx
jge 0x48162c
test edx, edx
jl 0x48167f
lea ecx, [edi - 1]
test ecx, ecx
jl 0x481646
lea eax, [ebp + ecx*4 - 0x33c]
cmp dword [eax], esi
jne 0x481646
mov edx, dword [ebp + 0xc]
dec ecx
mov dword [eax], edx
jns 0x481633
lea ecx, [edi + 1]
jmp 0x48165f
mov edx, dword [ebp - 0x18]
lea eax, [ebp + ecx*4 - 0x440]
cmp dword [eax], edx
jne 0x48167f
mov edx, dword [ebp + 0xc]
inc ecx
mov dword [eax], edx
cmp ecx, dword [ebp - 0x10]
jl 0x48164b
jmp 0x48167f
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 0x4814ce
mov esi, dword [ebp - 0x10]
mov eax, esi
shl eax, 2
push eax
push dword [ebp + 8]
call fcn.00478974
mov edi, eax
lea eax, [ebp - 0x134]
push 0
push eax
lea eax, [ebp - 0x238]
mov dword [ebp - 4], edi
push eax
call fcn.00481c82
mov dword [edi], eax
lea eax, [ebp - 0x134]
push 1
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.00481c82
add esp, 0x20
mov dword [edi + 4], eax
push 2
pop eax
cmp esi, eax
mov dword [ebp + 0xc], eax
jle 0x4817a5
mov eax, dword [ebp - 8]
add eax, 0x34c
add ebx, 0x30c
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x10], ebx
jmp 0x481708
push 1
call fcn.00460532
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 0x48175d
sub ecx, eax
mov esi, ecx
jmp 0x481760
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.00481c82
add esp, 0xc
test eax, eax
jl 0x481787
cmp esi, eax
je 0x481787
mov dword [edi + ebx*4], eax
jmp 0x481790
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 0x481705
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret