Function at 0x4b6690
Capabilities:
Terminate process

Disassembly:
sub esp, 0xd38
push ebx
push ebp
mov ebp, dword [esp + 0xd48]
mov ebx, dword [ebp + 0x504]
mov edx, dword [ebp + 0x508]
xor eax, eax
cmp ebx, eax
push esi
mov esi, dword [ebp + 0x510]
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jle 0x4b66d9
mov ecx, ebx
mov eax, 0xffffff38
lea edi, [esp + 0x138]
rep stosd dword es:[edi], eax
test ebx, ebx
jle 0x4b671b
mov eax, 0xffffff38
mov ecx, ebx
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
xor eax, eax
test ebx, ebx
mov ecx, ebx
lea edi, [esp + 0x23c]
rep stosd dword es:[edi], eax
jle 0x4b671b
mov eax, 1
mov ecx, ebx
lea edi, [esp + 0x340]
rep stosd dword es:[edi], eax
or eax, 0xffffffff
mov ecx, ebx
lea edi, [esp + 0x444]
rep stosd dword es:[edi], eax
test ebx, ebx
jne 0x4b6744
mov eax, dword [esp + 0xd54]
mov ecx, dword [esp + 0xd58]
push esi
push edx
push eax
push ecx
mov eax, edx
lea edi, [esp + 0x558]
xor ecx, ecx
call fcn.004b6040
add esp, 0x10
jmp 0x4b67a3
lea eax, [ebx - 1]
xor esi, esi
test eax, eax
jle 0x4b6b4e
lea edi, [esp + 0x548]
jmp 0x4b6760
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + esi*4 + 4]
mov ecx, dword [esp + 0xd54]
push edx
mov edx, dword [esp + 0xd5c]
push eax
mov eax, dword [ebp + 0x508]
push ecx
mov ecx, dword [ebp + esi*4]
push edx
call fcn.004b6040
mov ecx, dword [esp + 0x20]
add ecx, eax
add esp, 0x10
inc esi
lea eax, [ebx - 1]
add edi, 0x20
cmp esi, eax
mov dword [esp + 0x10], ecx
jl 0x4b6760
mov eax, ecx
test eax, eax
je 0x4b6b4e
mov eax, 0xffffff38
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [ebx - 1]
push edx
lea eax, [esp + 0x554]
push eax
call fcn.004b6240
mov eax, dword [esp + 0x24]
mov esi, eax
mov edi, eax
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp ebx, 2
mov dword [esp + 0x138], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x13c], eax
mov dword [esp + 0x10], 2
jle 0x4b6a0d
lea ecx, [ebp + 0x210]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov edi, dword [esp + eax*4 + 0x23c]
mov esi, dword [esp + eax*4 + 0x340]
mov dword [esp + 0x14], eax
cmp dword [esp + edi*4 + 0x444], esi
je 0x4b69e6
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + edi*4 + 0x344]
mov edx, dword [eax + esi*4 + 0x344]
mov ebx, dword [ebp + edi*4 + 0x208]
mov ebp, dword [ebp + esi*4 + 0x208]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + edi*4 + 0x138]
test ecx, ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + edi*4 + 0x34]
mov dword [esp + edi*4 + 0x444], esi
jl 0x4b6882
test edx, edx
jge 0x4b687e
mov edx, ecx
jmp 0x4b6882
add edx, ecx
sar edx, 1
mov ecx, dword [esp + esi*4 + 0x138]
test ecx, ecx
jge 0x4b6893
mov ecx, dword [esp + esi*4 + 0x34]
jmp 0x4b689f
mov eax, dword [esp + esi*4 + 0x34]
test eax, eax
jl 0x4b689f
add ecx, eax
sar ecx, 1
cmp edx, 0xffffffff
je 0x4b6a31
cmp ecx, 0xffffffff
je 0x4b6a31
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0xd58]
push eax
mov eax, dword [esp + 0xd60]
push eax
mov eax, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x3c]
push edx
call fcn.004b6430
add esp, 0x14
test eax, eax
je 0x4b69c7
mov edx, dword [esp + 0x14]
mov eax, 0xffffff38
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
sub edx, ebx
push ecx
shl ebx, 5
push edx
lea eax, [esp + ebx + 0x554]
push eax
call fcn.004b6240
mov ebx, dword [esp + 0x24]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x3c]
push edx
mov eax, ebx
shl eax, 5
sub ebp, ebx
lea ecx, [esp + eax + 0x560]
push ebp
push ecx
call fcn.004b6240
mov eax, dword [esp + 0x38]
add esp, 0x20
test edi, edi
mov dword [esp + edi*4 + 0x34], eax
jne 0x4b694f
mov dword [esp + 0x138], eax
cmp esi, 1
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + ecx*4 + 0x138], edx
mov dword [esp + ecx*4 + 0x34], ebp
mov dword [esp + esi*4 + 0x138], eax
jne 0x4b697a
mov dword [esp + 0x38], eax
test edx, edx
jge 0x4b6982
test ebp, ebp
jl 0x4b69db
lea eax, [ebx - 1]
test eax, eax
jl 0x4b69a3
lea esp, [esp]
cmp dword [esp + eax*4 + 0x340], esi
jne 0x4b69a3
dec eax
mov dword [esp + eax*4 + 0x344], ecx
jns 0x4b6990
mov edx, dword [esp + 0x24]
lea eax, [ebx + 1]
cmp eax, edx
jge 0x4b69db
mov edi, edi
cmp dword [esp + eax*4 + 0x23c], edi
jne 0x4b69db
mov dword [esp + eax*4 + 0x23c], ecx
inc eax
cmp eax, edx
jl 0x4b69b0
jmp 0x4b69db
mov eax, dword [esp + 0x10]
mov ecx, 0xffffff38
mov dword [esp + eax*4 + 0x138], ecx
mov dword [esp + eax*4 + 0x34], ecx
mov ebp, dword [esp + 0xd50]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
inc eax
add edx, 4
cmp eax, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jl 0x4b6813
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x138]
mov eax, dword [esp + 0xd4c]
lea edx, [ebx*4]
push edx
push eax
call fcn.004a90a0
add esp, 8
test esi, esi
mov dword [esp + 0x14], eax
jge 0x4b6a38
mov esi, edi
jmp 0x4b6a40
push 1
call fcn.004bc6cf
test edi, edi
jl 0x4b6a40
add esi, edi
sar esi, 1
mov ecx, dword [esp + 0x13c]
test ecx, ecx
mov dword [eax], esi
jge 0x4b6a53
mov ecx, dword [esp + 0x38]
jmp 0x4b6a5f
mov edx, dword [esp + 0x38]
test edx, edx
jl 0x4b6a5f
add ecx, edx
sar ecx, 1
cmp ebx, 2
mov dword [eax + 4], ecx
mov dword [esp + 0x10], 2
jle 0x4b6b4e
mov ecx, dword [esp + 0x20]
add ecx, 0x34c
add ebp, 0x30c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebp
jmp 0x4b6a91
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp + 0xfc]
mov edi, dword [ebp]
mov ebp, dword [esp + 0x14]
mov esi, dword [ebp + eax*4]
mov ecx, dword [ebp + edi*4]
mov edx, dword [esp + 0x20]
mov ebx, dword [edx + eax*4 + 0x344]
and esi, 0x7fff
and ecx, 0x7fff
sub ecx, esi
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x18]
mov edx, dword [edx]
sub edx, ebx
imul eax, edx
mov edx, dword [esp + 0x20]
mov edi, dword [edx + edi*4 + 0x344]
sub edi, ebx
cdq
idiv edi
test ecx, ecx
jge 0x4b6ae9
sub esi, eax
jmp 0x4b6aeb
add esi, eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + ecx*4 + 0x138]
test eax, eax
jge 0x4b6b00
mov eax, dword [esp + ecx*4 + 0x34]
jmp 0x4b6b0c
mov edx, dword [esp + ecx*4 + 0x34]
test edx, edx
jl 0x4b6b0c
add eax, edx
sar eax, 1
test eax, eax
jl 0x4b6b1a
cmp esi, eax
je 0x4b6b1a
mov dword [ebp + ecx*4], eax
jmp 0x4b6b24
or esi, 0x8000
mov dword [ebp + ecx*4], esi
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, 4
add esi, eax
add edx, eax
mov eax, dword [esp + 0x24]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edx
jl 0x4b6a8d
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd38
ret